I am running SQL 2008R2 and have a stored procedure that does several steps and updating different tables. I want to run another sp inside this sp and grab the value returned by the Output parameter. I have tried using below in my sp but it does not work. Any suggestions?
DECLARE @NewLineID int;
SET @NewLineID=(exec dbo.ms_insRepairOrderLinesDup@LineID=@LineID, @NewLineID=0)