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
 Transact-SQL (2000)
 Nested SP

Author  Topic 

supersql
Yak Posting Veteran

99 Posts

Posted - 2005-10-14 : 14:35:19
I have 2 SP's,the result of the 1st SP shud be passed as parameter to the second SP,can any help me how to do this.

anuj164
Starting Member

49 Posts

Posted - 2005-10-14 : 14:50:40
Try this ....

declare @a as int
exec b 2,3, @a output
exec a @a

CREATE PROCEDURE [dbo].[a]
@a as int
AS
Select @a + 5
GO

CREATE PROCEDURE dbo.b
@q as int,
@z as int,
@w as int output
as
Set @w = @q *@z
GO


Anuj
Go to Top of Page
   

- Advertisement -