Click here to Skip to main content
15,889,871 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
cn i write procedures in Procedures
please explain
Thanks
Posted
Comments
Maciej Los 17-Nov-13 11:05am    
I'm not sure what you mean...
Do you want to create new stored procedure inside another one?

Read the following : http://technet.microsoft.com/en-us/library/ms189915.aspx[^]

If you mean create multiple stored procedures inside a stored procedure (e.g. modules), then no you can't.
 
Share this answer
 
Comments
Maciej Los 17-Nov-13 11:06am    
+5!
Mehdi Gholam 17-Nov-13 13:34pm    
Thanks Maciej!
Further to Mehdi Gholam's answer, if it is the title of your post that indicates your question (rather than the text of the question itself) then yes, you can "use stored procedures in procedures"

Just call them one after the other e.g.
SQL
exec dbo.StoredProc1
exec dbo.StoredProc2
-- etc

Note that SQL Server is not asynchronous so StoredProc2 will not start until StoredProc1 has finished
 
Share this answer
 
Comments
Maciej Los 17-Nov-13 11:06am    
+5!
Mehdi Gholam 17-Nov-13 13:35pm    
5'ed
CHill60 17-Nov-13 15:59pm    
Thank you! Wasn't trying to contradict you by the way, just read the question in a different way. Also my 5 to you to directing OP to a good resource
Mehdi Gholam 18-Nov-13 1:49am    
No worries, good to have different views.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900