Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > updating multip...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 11025 of 11205
Post > Topic >>

updating multiple columns with subselect

by "Leif Neland" <leif@[EMAIL PROTECTED] > May 8, 2008 at 12:36 PM

This is not supported in MSsql.

update T1 set (theUpdatedValue, theOtherValue) =
      (select theTop, theValue from T2 where T2.theKey = T1.theID)

Is there a workaround?

Other than doing it in a loop from eg asp, over either fields (one
statement
per field), or over records (a query with a loop which for each row does a
select from one table, update other table with the selected values.)




 5 Posts in Topic:
updating multiple columns with subselect
"Leif Neland" &  2008-05-08 12:36:13 
Re: updating multiple columns with subselect
"Dan Guzman" &l  2008-05-08 07:42:28 
Re: updating multiple columns with subselect
"Leif Neland" &  2008-05-09 09:52:29 
Re: updating multiple columns with subselect
"Plamen Ratchev"  2008-05-08 09:37:43 
Re: updating multiple columns with subselect
--CELKO-- <jcelko212@[  2008-05-12 13:00:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sat Jul 5 5:01:55 CDT 2008.