Update from one table to another

  • Thread starter Thread starter compton
  • Start date Start date
C

compton

Guest
Hi,
Im trying to update records from one table to another using the pk as the condition. However using sql in Access i cannot get it to work. Any Ideas? Sql simplified is below

Update A Set A.Name = B.Name where A.ID = B.ID
(asks for parameter)

Also tried

Update A Set Name = B.Name from B where A.ID = B.ID
Get syntax error missing operator

Thanks
 
try this...

UPDATE
tblA

INNER JOIN
tblB ON tblA.ID = tblB.ID

SET
tblA.Name = [tblB]![Name]

WHERE
(([tblA].[ID]=[tblB].[ID]));
:)
 
it works

Thanks alot for your help
 

Users who are viewing this thread

Back
Top Bottom