[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Gilgamesh

3/22/2007 7:30:00 PM

I've got a stored procedure which returns a recordset. I need to call this
stored procedure from inside another stored procedure and then capture the
recordset returned by the first procedure. I need to then parse the
recordset and retrun one of the columns.
How do I do that?

Thanks,
Gilgamesh


3 Answers

sloan

3/22/2007 9:09:00 PM

0


The definition of #table MUST be the exact same as the usp results.

create table #table ( f1 int , f2 int )
insert into #table exec(uspSomeStoredProcedure)


drop table #table


Gilgamesh

3/22/2007 9:27:00 PM

0

This looks good.
Is there any other solution which doesn't use temp table approach? This SP
will be called quite often and there's a performance issue with creation and
deletion of temp tables.


-G

"sloan" <sloan@ipass.net> wrote in message
news:OzyjLZMbHHA.4140@TK2MSFTNGP06.phx.gbl...
>
> The definition of #table MUST be the exact same as the usp results.
>
> create table #table ( f1 int , f2 int )
> insert into #table exec(uspSomeStoredProcedure)
>
>
> drop table #table
>
>


Hugo Kornelis

3/23/2007 11:52:00 PM

0

On Thu, 22 Mar 2007 14:26:59 -0700, Gilgamesh wrote:

>This looks good.
>Is there any other solution which doesn't use temp table approach?

Hi Gilgamesh,

No, there is no other option.

> This SP
>will be called quite often and there's a performance issue with creation and
>deletion of temp tables.

What performance issue do you mean?

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hug...