all groups > sql server programming > november 2003 >
You're in the

sql server programming

group:

Calling one procedure from another


Re: Calling one procedure from another Tom Moreau
11/27/2003 3:19:36 PM
sql server programming:
Store the results in a temp table:

create proc sp_y
as

create table #temp
(
PK int primary key
, junk varchar (50)
)

insert #temp
exec sp_x 123

select count (*) as Counts -- or some ...
from #temp -- ... other such query
go

--
Tom

---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql


[quoted text, click to view]
Hi,

I have a rather complex procedure (sp_x), returning one resultset, which I
need to call from anthoer procedure (sp_y). Only I do not want sp_y to
return the resultset from sp_x, but only use the values found in sp_x, and
then return a different resultset based on the values from sp_x.
But how do I "catch" the resultset from sp_x in sp_y so i can use the values
returned ??
Is this possible ??

In advance, thanx...

Calling one procedure from another Soren Staun Jorgensen
11/27/2003 9:12:52 PM
Hi,

I have a rather complex procedure (sp_x), returning one resultset, which I
need to call from anthoer procedure (sp_y). Only I do not want sp_y to
return the resultset from sp_x, but only use the values found in sp_x, and
then return a different resultset based on the values from sp_x.
But how do I "catch" the resultset from sp_x in sp_y so i can use the values
returned ??
Is this possible ??

In advance, thanx...

Soren

AddThis Social Bookmark Button