Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SP with in SP

Status
Not open for further replies.

twigs1981

IS-IT--Management
May 29, 2002
52
0
0
US
I am trying to create a that calls other stored procedures. If I call one and it fails I want to roll back, but I when I try to do something like

declare @MyResult nchar (50)
SET @MyResult = EXEC master.dbo.sp_addrolemember @role, @username

I get "Error 156: Incorrect syntax near keyword 'EXEC'". Could someone point me in the right direction?

Thank you!
 
declare @MyResult nchar (50)
EXEC @MyResult = master.dbo.sp_addrolemember @role, @username
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top