Results 1 to 2 of 2

Thread: update table

  1. #1
    Join Date
    Sep 2004

    Unanswered: update table

    I have table that I need to update with values from a second table where the first column in table A equals the first column in table B.

    update A
    set A.column2 = --need to put here what the corresponding value is in table B column2 where a.column 1 = b.column1
    where A.column1 in
    (select A.column1 from A join B
    on (A.column1 = 2.column1)

    I think a look is needed, but I just cant it to work...
    Any help appreciated,

  2. #2
    Join Date
    Apr 2004
    Kansas City, MO
    UPDATE a
    SET a.column2 = b.column2
    FROM tablea a INNER JOIN tableb b ON a.column1 = b.column1

    You're missing a closing paran on your example btw.
    When life gives you a lemon, fire the DBA.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts