calling a stored procedure inside a stored procedure 
Author Message
 calling a stored procedure inside a stored procedure

I have this stored procedure
    sp_LeMEdia_LR

If i call (sp_LeMEdia_LR '02/01/2000', '02/29/2000', 1,2,1) it return the
follow

MTB     LR_PTB   MTP     LR_PTP   MESD    LR_PESD    MINIB    LR_PINIB
6.00       40            2.00      15             4.00        NULL         4
4

and what i need to know is if inside another procedure i can call this one,
and
how i can retrieve the values.



Sat, 08 Jun 2002 03:00:00 GMT
 calling a stored procedure inside a stored procedure

you can use OUTPUT parameters, instead of a result set in sp_LeMEdia_LR
or
create a temp table and insert from the stored proc

insert #temp
EXEC sp_LeMEdia_LR '02/01/2000', '02/29/2000', 1,2,1

--
Thanks,
David Satz
Principal Software Engineer
Hyperion Solutions
(using VB6 SP3/MTS/SQL Server 6.5 SP5a)
(Please respond to the newsgroup.)


Quote:
> I have this stored procedure
>     sp_LeMEdia_LR

> If i call (sp_LeMEdia_LR '02/01/2000', '02/29/2000', 1,2,1) it return the
> follow

> MTB     LR_PTB   MTP     LR_PTP   MESD    LR_PESD    MINIB    LR_PINIB
> 6.00       40            2.00      15             4.00        NULL
4
> 4

> and what i need to know is if inside another procedure i can call this
one,
> and
> how i can retrieve the values.



Sat, 08 Jun 2002 03:00:00 GMT
 calling a stored procedure inside a stored procedure
output parms will only work if there is one "row" of values.  Another
alternative is the INSERT / EXEC statement.  See BOL for info.
Quote:

> you can use OUTPUT parameters, instead of a result set in sp_LeMEdia_LR
> or
> create a temp table and insert from the stored proc

> insert #temp
> EXEC sp_LeMEdia_LR '02/01/2000', '02/29/2000', 1,2,1

> --
> Thanks,
> David Satz
> Principal Software Engineer
> Hyperion Solutions
> (using VB6 SP3/MTS/SQL Server 6.5 SP5a)
> (Please respond to the newsgroup.)



> > I have this stored procedure
> >     sp_LeMEdia_LR

> > If i call (sp_LeMEdia_LR '02/01/2000', '02/29/2000', 1,2,1) it return the
> > follow

> > MTB     LR_PTB   MTP     LR_PTP   MESD    LR_PESD    MINIB    LR_PINIB
> > 6.00       40            2.00      15             4.00        NULL
> 4
> > 4

> > and what i need to know is if inside another procedure i can call this
> one,
> > and
> > how i can retrieve the values.



Sun, 09 Jun 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Calling a Java Stored Procedure from another Java Stored Stored Procedure

2. Calling Stored Procedure that calls Stored Procedure in ASP

3. How to exec a stored procedure inside another stored procedure

4. Calling a stored procedure with parameters from another stored procedure

5. Calling a Stored Procedure from a Stored Procedure

6. HELP: Stored procedure calling stored procedure

7. Calling stored procedures from another stored procedure

8. Calling a stored procedure by another stored procedure

9. Calling a stored procedure from within a stored procedure

10. Calling a stored procedure within a stored procedure.

11. return select values in stored procedure to a calling stored procedure

12. Calling a Stored Procedure from within a Stored Procedure


 
Powered by phpBB® Forum Software