Update table using store procedure

  • I am trying to update a table with a values from another table using a store procedure. Can any one tell me the syntax please

    Here is what I am trying to do

    Update tbl1 set tbl1.address = tbl2.address where tbl1.cuid = tbl2.cuid

    How can I put this in stored procedure an create a job?

    Please help.

  • Update tbl1

    set

    address = tbl2.address

    from

    tbl1

    join

    tbl2

    on tbl1.cuid = tbl2.cuid

  • Thank you,

    Yes this works.

    Appreciate your help.

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

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