Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Update statement on multiple columns

    Hi,

    I am trying to update multiple columns on a table using a single statement. This is the the outcome of my update statement.

    update SA.D.EMP SET FIRSTNME = (SELECT func1(FIRSTNME),
    LASTNAME = (SELECT func2(LASTNAME),
    BIRTHDATE = (SELECT func3(BIRTHDATE) from SA.D.EMP where ME_E = 1)

    where func1,func2 ,func3 are seperate functions .updating columns of a table using functions.

    I don't how to arrange the columns in the above statement. I am new to this , kindly let me know how to place the columns .

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    update table set (column1, column2, column3) = (select col1,col2,col3 from...)

    Andy

  3. #3
    Join Date
    Jul 2014
    Posts
    294
    Thanks Andy

Tags for this Thread

Posting Permissions

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