June 8, 2009 at 8:55 am
Is it possible to update more than 1 column from a 3 way table join?
the following update works when I remove , Col_D = S.Col_D
How can I accomplish the update of multiple columns in 1 UPDATE statement
UPDATE Table_1 SET Col_C = S.Col_C, Col_D = S.Col_D
FROM Table_1 R,
Table_2 TR,
Table_3 S
WHERE R.Col_A = TR.Col_A
AND S.Col_B = TR.Col_B
June 8, 2009 at 9:00 am
DBASkippack (6/8/2009)
Is it possible to update more than 1 column from a 3 way table join?the following update works when I remove , Col_D = S.Col_D
How can I accomplish the update of multiple columns in 1 UPDATE statement
UPDATE Table_1 SET Col_C = S.Col_C, Col_D = S.Col_D
FROM Table_1 R,
Table_2 TR,
Table_3 S
WHERE R.Col_A = TR.Col_A
AND S.Col_B = TR.Col_B
What is happening when Col_D = S.Col_D is in the UPDATE statement? Are you getting an error of some sort?
June 8, 2009 at 9:15 am
Thanks for your reply -- forced me to re-examine the statement.. It works successfully. I had a type in the 2nd column name I was attempting to update...
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply