Passing a result set from one stored procedure to another stored procedure

Passing a result set from one stored procedure to another stored procedure

Post by Anan » Wed, 13 Aug 2003 04:25:49



Hi all

Is there any way that I can pass a result set from one
stored procedure to another stored procedure.

When I explored I found that  a procedure can be created
with a cursor output parameter.
But I need it to be a procedure accepting ie INPUT with
Cursor. Guess there is no way fo this.

Is there any workaroun to achieve this.

Thanks in advance
Anand.

 
 
 

Passing a result set from one stored procedure to another stored procedure

Post by JD » Wed, 13 Aug 2003 05:47:56


Write the results of the first proc to a temp table or a permanent table that
has a status field to update when processed.

Then query or step thru the result set table and perform your buiness rules.

An alternative is to create a view that defines the basic result set then query
that with parameters and do your business.

What are your goals/business rules?

For example take you raw calendar data and post that into a sales table and
update those sales rows from both the calendar and subsequent history tables.

HTH

JeffP...


Quote:> Hi all

> Is there any way that I can pass a result set from one
> stored procedure to another stored procedure.

> When I explored I found that  a procedure can be created
> with a cursor output parameter.
> But I need it to be a procedure accepting ie INPUT with
> Cursor. Guess there is no way fo this.

> Is there any workaroun to achieve this.

> Thanks in advance
> Anand.


 
 
 

Passing a result set from one stored procedure to another stored procedure

Post by Jacco Schalkwij » Wed, 13 Aug 2003 11:04:25


http://www.algonet.se/~sommar/share_data.html

--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.


Quote:> Hi all

> Is there any way that I can pass a result set from one
> stored procedure to another stored procedure.

> When I explored I found that  a procedure can be created
> with a cursor output parameter.
> But I need it to be a procedure accepting ie INPUT with
> Cursor. Guess there is no way fo this.

> Is there any workaroun to achieve this.

> Thanks in advance
> Anand.