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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 storing output of stored procedure in temp table

Author  Topic 

ujjaval
Posting Yak Master

108 Posts

Posted - 2006-01-12 : 22:43:30
Hi,

in my script file,I want to store output of a stored procedure into a temporary table which I can use in another query. How can I create a temporary table and store that output in it and use it in another query..

I guess I want to do the following.

create #temptable

#temptable = exec sp_code 4

select id from codeTable where id not in (#temptable)


thanks in advance,
Ujjaval.

X002548
Not Just a Number

15586 Posts

Posted - 2006-01-12 : 22:45:47
INSERT INTO myTable(Collist...) EXEC mySporc



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page
   

- Advertisement -