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 |
|
sudha12345
Starting Member
47 Posts |
Posted - 2009-08-28 : 09:19:38
|
| I has two tables as belowTemp ID Name1 System12 System23 NULL4 System4Temp1ID Name3 System4i wrote an Update query to update the Name of Temp Table with the Name of Temp1 Table (The Name NULL has to be updated with System4 by aking it from Temp1)I wrote a query likeupdate temp set name = (select name from temp1 where temp.id =temp1.id)But it is Updating all the 4 rows instead on only 1 rowcan anyone correct the Query?Sudhakar |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-28 : 09:27:12
|
| update tset name=t1.namefrom temp as t inner join temp1 as t1on t.id=t1.id and t.name is nullMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|