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 2000 Forums
 SQL Server Development (2000)
 Stored procedures

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-12-06 : 08:30:02
Taru writes "how to execute a stored procedure using another stored procedure?"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-06 : 08:31:38
The, uh, EXECUTE statement would work:

CREATE PROCEDURE proc1 AS
SELECT getdate()
GO
CREATE PROCEDURE proc2 AS
EXECUTE proc1
GO


I love self-answering posts.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-12-06 : 08:33:38
create sp2
as
exec sp1
go

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -