Calling a stored procedure with parameters from another stored procedure

Calling a stored procedure with parameters from another stored procedure

Post by Jody » Wed, 06 Oct 1999 04:00:00



How can I call a stored procedure that has parameters from another stored
procedure?

What we want to do is use the result set from a stored procedure with
further criteria.  Doing something like this (excuse me if this is way off,
I'm new at this): SELECT * from spTest '11' WHERE job = '993039' does not
work.  Can something like this be done (I realize it might have to be done a
completely different way).

TIA!
Jody

 
 
 

Calling a stored procedure with parameters from another stored procedure

Post by pni.. » Thu, 21 Oct 1999 04:00:00


try this





this example uses the output of one stored procedure as the parameter
of a second stored procedure

if oyu are talking about wanting to nest a stored procedure within a
select statement such as

select x1, exec sp_test1 from temp

I don't think this is possible under sql server which is a shame since
you have been able to do this in Oracle for at least 3 yrs.

Hope this helps
Craig

On Tue, 5 Oct 1999 10:15:29 -0400, "Jody"


>How can I call a stored procedure that has parameters from another stored
>procedure?

>What we want to do is use the result set from a stored procedure with
>further criteria.  Doing something like this (excuse me if this is way off,
>I'm new at this): SELECT * from spTest '11' WHERE job = '993039' does not
>work.  Can something like this be done (I realize it might have to be done a
>completely different way).

>TIA!
>Jody