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 |
|
chriztoph
Posting Yak Master
184 Posts |
Posted - 2010-09-28 : 22:27:40
|
| Hi everyone!How to update a tablelike this;UPDATE Table_2SET Table_2.TypeID = Table_1.TypeIDWHERE Table_2.Name = Table_1.Name |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2010-09-28 : 23:02:18
|
Here's one way:update t2 set t2.typeid = t1.typeidfrom table_1 t1inner join table_2 t2 on t2.name = t1.name Be One with the OptimizerTG |
 |
|
|
chriztoph
Posting Yak Master
184 Posts |
Posted - 2010-09-29 : 00:18:38
|
| Thanks TG |
 |
|
|
|
|
|