QUESTION: How can I call a Stored Procedure from another Stored Procedure 
Author Message
 QUESTION: How can I call a Stored Procedure from another Stored Procedure

I need to access the results of stored procedure sp_1 inside of stored
procedure sp_2.

sp_1 takes three parameters and returns a result set of data.

Help.  Thanks!

Keith Messing



Sun, 24 Sep 2000 03:00:00 GMT
 QUESTION: How can I call a Stored Procedure from another Stored Procedure

Use :
    Create Table #temptable (.......)

    Insert Into #temptable
    Execute sp_name

Now you can access the data from the temp table.

Quote:

> I need to access the results of stored procedure sp_1 inside of stored
> procedure sp_2.

> sp_1 takes three parameters and returns a result set of data.

> Help.  Thanks!

> Keith Messing



Sun, 24 Sep 2000 03:00:00 GMT
 QUESTION: How can I call a Stored Procedure from another Stored Procedure

Instead of passing a temp table name you can insert the resultset into a
temp table in sp2 using the results set of the sp as input for an insert.
This is introduced in 6.5.

INSERT [INTO]
{table_name | view_name} [(column_list)]



 You can also use this with remote stored procedures, so you can return a
result set from a different SQL Server.



Wed, 04 Oct 2000 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Calling Stored Procedure that calls Stored Procedure in ASP

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

3. Stored Procedure calling Stored Procedure

4. Call a stored procedure from another stored procedure

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

6. Calling a Stored Procedure from a Stored Procedure

7. How to call an Oracle Stored procedure from MSSQL Server Stored Procedure

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

9. Stored procedure calls multiple stored procedures

10. Calling stored procedures from another stored procedure

11. Call a stored procedure in another stored procedure

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


 
Powered by phpBB® Forum Software