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 |
|
arorarahul.0688
Posting Yak Master
125 Posts |
Posted - 2009-06-09 : 04:50:59
|
| Hi All,I have two tables table aACol1 Col21 aaaa 2 bbbb3 cccc4 dddd 5 eeee 6 ffffTable bBCol1 Col24 kkkk5 lllli want to run a query to update the Col2 in table A with col2 in table B Where the Col1 in A = Col1 in BHow can i do it without using cursors....Please give your some time Thanks,Rahul Arora NCCE, Panipat ######################IMPOSSIBLE = I+M+POSSIBLE |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-09 : 04:55:41
|
don't need cursorupdate aset col2 = b.col2from tablea a inner join tableb b on a.col1 = b.col1 KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
arorarahul.0688
Posting Yak Master
125 Posts |
Posted - 2009-06-09 : 05:43:13
|
quote: Originally posted by khtan don't need cursorupdate aset col2 = b.col2from tablea a inner join tableb b on a.col1 = b.col1 KH[spoiler]Time is always against us[/spoiler]
Bingo....thanks a lotRahul Arora NCCE, Panipat ######################IMPOSSIBLE = I+M+POSSIBLE |
 |
|
|
|
|
|