March 21, 2007 at 9:05 am
UPDATE Table2 INNER JOIN Table1 ON Table2.Description = Table1.Description SET Table1.idcreated = Table2.ID
Err 156 - incorrect syntax near the keyword INNER
Ta
March 21, 2007 at 9:13 am
UPDATE t1
SET idcreated = t2.ID
FROM Table2 t2 INNER JOIN Table1 t1
ON t2.Description = t1.Description
John
March 21, 2007 at 9:15 am
Put the 'set' before the 'join' and set the table2 column like:
UPDATE Table2 SET Table2.ID = Table1.idcreated INNER JOIN Table1 ON Table2.Description = Table1.Description
March 22, 2007 at 3:57 am
Thanks both of you - my set was in the wrong place - and I needed a from.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply