Re: EMERGENCY! How can I update one table from another in a select
- From: John W. Vinson/MVP <please.reply@xxxxxxxxxxxxxxxx>
- Date: Thu, 31 Jul 2008 19:54:17 -0600
On Thu, 31 Jul 2008 08:27:02 -0700, Bob Dancer
<BobDancer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I'm not sure if I understand. If Table a, Column 1 has info and Table B,
Column 1 is empty (this woulb the duplicate I created myself), should I
delete Column 1 of Table 2 and do the query afterwards? I have 40 columns in
each table and both have the exact column structure except only one of each
duplicate pair has information. Obviously I created empty columns thinking
that it would be necessary for query. If I removed these "dummy columns" and
left only the columns which had information along with the columns in both
tables that have a common denominator (ex. Policy number and/or name) will
this work? Once this is done how would I make a query to access this?
I think you ARE misunderstanding how queries work.
Relational databases use the "Grandmother's Pantry Principle": "A
place - ONE place! - for everything, everything in its place".
If you have a Table or Orders, then the table should contain *only*
fields for information about Orders. If you have a table of Products,
that table should contain *only* contain fields for information about
products. If you have an OrderDetails table detailing which products
comprise each order, it should have only a link to the Orders table -
the orderID - and one to the Products table - the ProductID; it should
not include say the ProductName or the CustomerID.
You certainly do NOT need to include blank columns in a table in
anticipation of that table being used later in a Query.
--
John W. Vinson/MVP
.
- Prev by Date: Re: SQL ORDER BY
- Next by Date: Re: Search Date and Time
- Previous by thread: Re: SQL ORDER BY
- Next by thread: Re: Search Date and Time
- Index(es):
Relevant Pages
|