Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
TheOne
Starting Member
6 Posts |
Posted - 2009-05-11 : 05:21:35
|
| Can v update two different columns of different table in single query.for example:- update a set a.col_name = 'xyz' from table1 a ,table b where a.col= b.col and a.some_column= 1this is correctupdate a,b set a.col_name = 'xyz' ,b.col_name = 'abc'from table1 a ,table b where a.col= b=col and a.some_column= 1 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-11 : 05:23:33
|
Nope. You can't KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-05-11 : 06:13:02
|
| ya possible.. it will work.Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-05-11 : 06:21:16
|
quote: Originally posted by senthil_nagore ya possible.. it will work.Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled
It is not possible. You should use two different queriesMadhivananFailing to plan is Planning to fail |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-05-11 : 06:46:26
|
| Sorry, I miss interpret it.Thanks FYISenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
 |
|
|
|
|
|