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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-07-13 : 09:27:15
|
| cindy writes "hi,i have two tables T1,T2:T1 include fields like:productcode,a,b,c,dT2 include fields like:productcode,a,b (field names are same as those in T1)what i want to do in a store procedure is :update all records in T1 using data from T2 when the a and b in T1 are both null according to the productcodethanks" |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-13 : 09:32:41
|
May be this is what u are looking for...update t1set ...from t1 join t2 on t1.productcode = t2.productcodewhere t1.a is NULL and t1.b is NULL Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
|
|
|