Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 suggest me update query
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

58 Posts

Posted - 02/28/2013 :  04:43:56  Show Profile  Visit kirank's Homepage  Reply with Quote

Please suggest me on update query.

i want to update #tempbulk (temp table) table. where i have two column

i want to update that column base on id and subid columns . below is the records in id and subid coulmns

id subid name subname
2 22
3 55

here 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 =

something like that, plz suggest

--------------------------- |

In (Som, Ni, Yak)

17689 Posts

Posted - 02/28/2013 :  04:52:36  Show Profile  Reply with Quote

update t
set    name    = m.idname , 
       subname = m.idsubname
from   #tempbulk t
       inner join masterid m on =

Time is always against us

Go to Top of Page

Yak Posting Veteran

58 Posts

Posted - 02/28/2013 :  05:11:13  Show Profile  Visit kirank's Homepage  Reply with Quote
Thank you it works for me. :)

--------------------------- |
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000