Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Proc results into a temp table?

Status
Not open for further replies.

Danster

Technical User
May 14, 2003
148
AU
Hi all,

I have a stored procedure which returns 1 or 2 rows. No more than 2.

I have a table which I want to pass a value to the stored proc for every row in the table. My table only has about 30 or 40 rows.

Each time the stored proc runs with the current table.field value, I want the output in a temp table so eventually it will build up to contain all the stored proc results for each value in the table.

How would I do that?

cheers

Danster

 
INSERT INTO <temptable> EXEC storedproc

Structure of temptable must match storedproc output.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Beaut!
Gee I was looking all thru BOL for that one-liner. I'll give it a go tomorrow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top