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 - 2000-11-30 : 11:08:33
|
jrvasquez writes "Im having a little problem here. I want to retrieve an id (actually all id's) from a query i execute in an sp_. Imagine this:
SELECT ALLIDS = (SELECT CategoryId FROM Categories WHERE TopCategory = SubCatgory)
To put it short this is impossible if the statement returns more than 1 Id.
What im trying to do is catch each id so i can build a dynamic query (experimented a bit with the parse array/csv array script) which generates a recordset which will be put in a temporary table.
The problem is that is dont want to execute the same query multiple times (each time) with another id, but would like to do this all in an sp to build a temporary table which returns the right data at once.
My question is, how do i catch the (multiple) id's from the first select statement(in an sp_)?
Oh, its for use in an asp environment, and im using w2000 server with sql-server7.0" |
|
|
|
|
|