Update Qry question

J

JOM

I would like to to update 3 tables at once with a single field from a 4th
table is this possible?
 
D

Douglas J Steele

Try something like:

UPDATE Table1 INNER JOIN Table2
ON Table1.ID = Table2.ID
SET Field1 = Table2.Field2
WHERE Field2 = 12343
 
J

JOM

ok here is my query
UPDATE Table1 INNER JOIN Table2 ON Table1.NameID = Table2.AdvantageID SET
Table1.Name = Table2.AdvantageName
WHERE (((Table1.Name)="Fruits"));
but when I run it it say 0 records therefore does not update the table2
Why?
 
J

JOM

yes I do, but what I want is get all the records in table1.name and
append/update table2.advantagename
 
D

Douglas J. Steele

Huh? I don't understand what you mean.

Can you give an example, with sample data?
 
V

Van T. Dinh

The SQL specifies updating Table1, NOT Table2.

The Fields to be updated must be on the LHS of the assignment statement in
the SET clause.

Doug's example updates Table1 so you need re-structure it if you want to
update Table2.
 
Top