Call a stored procedure in another stored procedure 
Author Message
 Call a stored procedure in another stored procedure
Hi,

I dont know how to call a stored procedure from another
stored procedure. I know it can be done but im a rookie
with sql server programming.

thank you



Sun, 16 Oct 2005 22:20:36 GMT
 Call a stored procedure in another stored procedure

Inside the first SP use the EXEC to call the second SP.

Create proc SP1
As
...
...
Exec SP2 ,,,
...
...

--
HTH,
Vinod Kumar
MCSE, DBA, MCAD
SCT Software Solutions

Hi,

I dont know how to call a stored procedure from another
stored procedure. I know it can be done but im a rookie
with sql server programming.

thank you



Sun, 16 Oct 2005 22:31:50 GMT
 Call a stored procedure in another stored procedure
Use following syntax

exec <sp_name> param1,param2

--Vishal

Quote:
>-----Original Message-----
>Hi,

>I dont know how to call a stored procedure from another
>stored procedure. I know it can be done but im a rookie
>with sql server programming.

>thank you
>.



Sun, 16 Oct 2005 22:28:20 GMT
 Call a stored procedure in another stored procedure
...and if you need to use the results from one stored procedure in another stored procedure you have to create the temporary table first

as in

create table #foo (col1 datatype, col2 datatype, col3 datatype....)

Then you can use #foo in your main stored procedure

--
Keith, SQL Server MVP

Inside the first SP use the EXEC to call the second SP.

Create proc SP1
As
...
...
Exec SP2 ,,,
...
...

--
HTH,
Vinod Kumar
MCSE, DBA, MCAD
SCT Software Solutions

Hi,

I dont know how to call a stored procedure from another
stored procedure. I know it can be done but im a rookie
with sql server programming.

thank you



Sun, 16 Oct 2005 22:33:19 GMT
 Call a stored procedure in another stored procedure
Use EXEC

eg.

EXEC myproc

--
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)



Sun, 16 Oct 2005 22:42:51 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Call a stored procedure from another stored procedure

2. Calling a Stored Procedure from a Stored Procedure

3. Calling a stored procedure by another stored procedure

4. QUESTION: How can I call a Stored Procedure from another Stored Procedure

5. Calling a Stored Procedure from a Stored Procedure

6. Calling a stored procedure within a stored procedure.

7. How do I call a stored procedure from another stored Procedure

8. Calling A Stored Procedure from another Stored Procedure

9. Calling a stored procedure from a stored procedure

10. calling a stored procedure inside a stored procedure

11. Can I call a stored procedure from a stored procedure

12. Calling Java Stored Procedure from SQL Stored Procedure


 
Powered by phpBB® Forum Software