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-05-11 : 08:18:25
|
| ASHOK writes "How can I write a Query which returns multiple rows in its inner query.The outer Query will fetch the record based on the criteria returned by inner query. Please send me an Example " |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-05-11 : 08:37:31
|
| maybeselect from tblwhere id in (select id from ......)==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-05-11 : 08:56:59
|
| But, since the use of "sub query" is inefficient,u may use a "Join" instead!!Select t1.F1, t1.F2 ... from t1inner join t2 on t1.id = t2.idSrinika |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-11 : 09:11:04
|
| Also look for subqueries in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|