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 |
hai
Yak Posting Veteran
84 Posts |
Posted - 2007-05-30 : 11:05:28
|
Can this be re-written using inner join in the following part? col3 in (select col1 from table2 where col2 = '' and compPassQA is null)from the following update statement?UPDATE table SET col1 = col1 + '-XXX' where col2 IS NULL and col3 in (select col1 from table2 where col2 = '' and compPassQA is null)thanks |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-30 : 11:10:58
|
Certainly.Update t1set Col1 = Col1 + '-XXX'From Table t1 Join Table2 t2on t1.col3 = t2.col1and t2.col2 = '' and t2.compPassQA is null and t1.col2 is NULL Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
hai
Yak Posting Veteran
84 Posts |
Posted - 2007-05-30 : 11:25:00
|
thank you...wow...does work faster with inner join. Harsh, can you explain a bit, if you don't mind, why inner join make a different? I'm trying to figure and learn sql stuffs.thanks |
 |
|
|
|
|