Thread: Update From
View Single Post
  #9 (permalink)  
Old 08-21-08, 07:00
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Stolze - I'm like George and predominantly use MS T-SQL and know little of the standard. Is this standard SQL?
Code:
UPDATE table_1 AS t1
SET    ( some_value, other_value ) = ( SELECT t2.some_value, other_value
                                       FROM table_2 AS t2
                                       WHERE t1.some_id = t2.some_id )
???
If so then the infamous UPDATE....FROM would be totally unnecessary if T-SQL supported the standard fully.

In case you are interested (bet you ain't) SET NOCOUNT ON just tells SQL Server not to count, and return, the number of rows affected by the proceeding statements.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote