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 |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-12-12 : 00:30:04
|
| Dear all,i'm trying to convert the query from in to exists.am i doing correct?select * INTO #TMP_TBL1 FROM TABLE16 WHERE COL1 IN(SELECT COL1 FROM TABLE15 WHERE COL2='code1' AND COL1='code2') select * INTO #TMP_TBL1 FROM TABLE16 K WHERE EXISTS (SELECT COL1 FROM TABLE15 L WHERE L.COL2='code1' ANDL.COL1='code2' AND K.COL1=L.COL1) VinodEven you learn 1%, Learn it with 100% confidence. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-12-12 : 00:52:16
|
| Did you get any error?MadhivananFailing to plan is Planning to fail |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-12-12 : 01:09:05
|
| there is no error, but actually in place of code1 and code2, there are id'sthe query is from inside a procedure. those should be provided at the time of execution.that's why i'm asking logically. even in place of * also, some around 20 columns are thereVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
|
|
|