Update multi cols in 1 update (in 3 way join)

  • 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

    BT
  • 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?

  • 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...

    BT

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply