I am calling a stored procedure, which returns an int, let's call it sp1, from another stored procedure, sp2. I need to store the returned value from sp1 in a variable but I don't want that returned value to be part of the returned data row of sp2. Any way I can pull this off?
Currently the following gives me two returned data set and I do not want the first one:
-- in sp2:
DECLARE @myvariable int
EXEC @myvariable= spMyStoredProcedure 'arg1', 'arg2' --sp1, it returns one int