Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Run Procedure

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2008-05-19 : 18:01:43
Hello,

How can I run a procedure from within another procedure?

Thank You,
Miguel

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-19 : 18:18:31
It's the same code if you were to just run the parent stored procedure in SSMS.

EXEC ObjectOwner.StoredProcName @var1 = 1, @var2 = 'other', ...

Just place the code you would use to call the child stored procedure directly into the parent stored procedure.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page
   

- Advertisement -