How To Execute A Stored Procedure With Another Stored Procedure?
I have session lock procedure which do the action of when one procedure is running in one session if the same procedure is running another session it will not execute until the fir
Solution 1:
Try this:
DECLARE@threadidINT=0;
DECLARE@ExecuteString NVARCHAR(MAX) = N'[dbo].[usp_Test1] @threadid= '+CAST(@threadidASVARCHAR(4)) +';'EXEC [util].[system-LockProcedure] @ExecuteString;
Solution 2:
Before the end of the stored procedure you use procedure name who wants to execute and its corresponding parameter like :
Alterprocedure Procedure1
Asbeginselect*from TableName
Exec Procedure2
end
Post a Comment for "How To Execute A Stored Procedure With Another Stored Procedure?"