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 |
|
BigRetina
Posting Yak Master
144 Posts |
Posted - 2003-01-21 : 05:17:48
|
| Salute..I am new to TABLE data type, I moved to SQL2K recently.BOL says that I can not do the following with a table variable :INSERT INTO table_variable EXEC stored_procedureBUT..I this is exactly what i want to perform. I want to insert the result set generated by EXEC sp_who into a table variable then select some rows from it!..any work around?Thanks. |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-01-21 : 06:19:58
|
| You can do this with a temp table.==========================================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. |
 |
|
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2003-01-21 : 06:32:17
|
| I think the table variables have too many limitations. They are only usable in certain circumstances. Does anyone know why these limitations exist? Would be much more useful if you could do insert..exec and updates etc. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-01-21 : 06:39:13
|
| They are new and I suspect more functionality will be added later.Better than the usual practice of giving more functionality which doesn't work.Suspect insert ... exec will be allowed at some point.Indexes ? maybe they ae meant to be small so don't need them.You can update data in a table variable.==========================================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. |
 |
|
|
BigRetina
Posting Yak Master
144 Posts |
Posted - 2003-01-21 : 06:56:04
|
| Thanks |
 |
|
|
|
|
|