Calling SP from inside another SP 
Author Message
 Calling SP from inside another SP

Hi,

I want to execute SP from another SP. the SP to be called needs to return a
value so that the calling SP stores the result and executes INSERT at the
end...Somenthing like

SP 1:

----


that exactyly but next I go to SP2

SP2
---

and I want to return this regionID so that to continue with INSERT STATEMENT
in SP1. AMOF, before I do the actual INSERT i need to execute the same logic
against three other tables to construct and insert  a composite primary_key.

How can I do that ?

Thanks



Sun, 15 May 2005 00:28:39 GMT
 Calling SP from inside another SP

You need to use output paramters. See example D from CREATE PROCEDURE
documentation in SQL Server Books Online.
--
HTH,
Vyas, MVP (SQL Server)

http://vyaskn.tripod.com/


Hi,

I want to execute SP from another SP. the SP to be called needs to return a
value so that the calling SP stores the result and executes INSERT at the
end...Somenthing like

SP 1:

----


that exactyly but next I go to SP2

SP2
---

and I want to return this regionID so that to continue with INSERT STATEMENT
in SP1. AMOF, before I do the actual INSERT i need to execute the same logic
against three other tables to construct and insert  a composite primary_key.

How can I do that ?

Thanks



Sun, 15 May 2005 00:26:39 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. How can I call a SP inside a SP without the owner name

2. calling SP inside SP

3. How Get Output Param from Inside SP, calling another SP

4. function calls inside SP exec call

5. Using a SP inside another SP

6. Use a sp to Make a view with a sp inside

7. sp inside sp

8. Check if parameter supplied to SP inside SP

9. Call DLL inside SP

10. calling a stored procedure inside another sp

11. CALLING SP INSIDE A TRIGGER

12. Calling a SP from a SP


 
Powered by phpBB® Forum Software