I need to know how to call a stored procedure from a stored procedure and also if I can pass variables to the called stored procedure.I am using SQL SERVER 7.0<br><br><br><br>thanks
Yes, stored procedures can easily be called from other stored procedures by using EXECUTE:<br><br>eg.<br><br>DECLARE @Var1 INT<br>DECLARE @Var2 VARCHAR(20)<br><br>SELECT @Var1 = 20<br>SELECT @Var2 = 'Fred'<br><br>Execute sp_Name @var1, @Var2<br><br>Chris Dukes
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.