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 |
kirank
Yak Posting Veteran
58 Posts |
Posted - 2013-02-28 : 04:43:56
|
Hi,Please suggest me on update query.i want to update #tempbulk (temp table) table. where i have two column name,subname.i want to update that column base on id and subid columns . below is the records in id and subid coulmnsid subid name subname2 223 55here i want to update name and subname from master table where i have mention wht is mean by 2 and 3 as id and wht is 22 and 55 i have try that below query but not proper way to solve.UPDATE #tempbulk SET name = (select idname from masterid,#tempbulk where id = #tempbulk.id)something like that, plz suggest---------------------------http://codingstuffsbykiran.blogspot.com | http://webdevlopementhelp.blogspot.com |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-02-28 : 04:52:36
|
[code]update tset name = m.idname , subname = m.idsubnamefrom #tempbulk t inner join masterid m on t.id = m.id[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
kirank
Yak Posting Veteran
58 Posts |
|
|
|
|