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 |
|
sona
Yak Posting Veteran
68 Posts |
Posted - 2001-12-07 : 00:45:33
|
| hello,While <condition>Begin::Select column1,column2 from Table::EndThe thing is i have to return the selected rows back to the client.Is there any way that i return all the rows selected within the while loop in a single recordset to the client without using a TempTable |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2001-12-07 : 00:50:18
|
| Basically, no. Not like that.You could use a union, but that won't help if you need the loop.Temp table or table varible is really your only option.Damian |
 |
|
|
sona
Yak Posting Veteran
68 Posts |
Posted - 2001-12-07 : 00:53:55
|
| Okay, Help me with this.I use a cursorI tried to avoid cursor with that of temp table.But both took same time with quite few number of records.But if my records are gonna to increase which one is the best. |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2001-12-07 : 00:59:26
|
| well, if you want to return records in one set, the cursor won't do you any good at all.I would go with temp tables, or if you are using SQL2000 use table variables.Damian |
 |
|
|
|
|
|