Add field from other table

Don White

Spider
Local time
Today, 09:24
Joined
Jan 6, 2005
Messages
17
Add Fac code from one table to another

I have a table that I want to add a field from another table.

table one has a field called grp that I want to add what fac they are from.
Table two has the Fac code. How do I add the fac code without ending up with duplicate records in the new table

example:

table one:
grp 1
grp 2
grp 3

Table two
grp 1 fac 6
grp 1 fac 6
grp 1 fac 6
grp 2 fac 7
grp 2 fac 7
grp 3 fac 8
grp 3 fac 8
grp 3 fac 8
grp 3 fac 8

I want this results in new table
grp 1 fac 6
grp 2 fac 7
grp 3 fac 8

I cannot end up with adding only the fac code for the new table that should be the same but only the field fac added. No more records.


Thanks,

Don
 
It sounds like you are running an append query rather than an update query. Append adds new rows. Update, updates existing rows. You'll get a message after running the query saying x rows will be updated. That number will reflect the number of rows in the many-side table. This is not a problem. It just means that the same row is going to be updated multiple times, hopefully with the same data.
 

Users who are viewing this thread

Back
Top Bottom