Results 1 to 2 of 2

Thread: update columns

  1. #1
    Join Date
    Apr 2004
    Location
    Melbourne
    Posts
    144

    Unanswered: update columns

    Can i use a multiple set in the update clause?

    update CML.dbo.property
    set total_Billed_Q1
    =ISNULL ( dbo.property2.total_Billed_Q1 , 0 ),
    set total_Billed_Q2
    =ISNULL ( dbo.property2.total_Billed_Q2 , 0 )
    FROM property
    INNER JOIN
    property2 on
    property.financial_year = property2.financial_year
    and
    property.property_ref = property2.property_ref

  2. #2
    Join Date
    Sep 2005
    Posts
    161
    Quote Originally Posted by jcwc888
    Can i use a multiple set in the update clause?

    update CML.dbo.property
    set total_Billed_Q1
    =ISNULL ( dbo.property2.total_Billed_Q1 , 0 ),
    set total_Billed_Q2
    =ISNULL ( dbo.property2.total_Billed_Q2 , 0 )
    FROM property
    INNER JOIN
    property2 on
    property.financial_year = property2.financial_year
    and
    property.property_ref = property2.property_ref

    Yes. Just separate the columns with a comma.

    set total_Billed_Q1
    =ISNULL ( dbo.property2.total_Billed_Q1 , 0 ),
    total_Billed_Q2
    =ISNULL ( dbo.property2.total_Billed_Q2 , 0 )

    Bill

Posting Permissions

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