I have a SP with an Output parameter that looks like:
ALTER PROCEDURE [dbo].[SP_Name] @VarName decimal(18,2) OUTPUT as
...
I call that procedure from vb.net to get the value for calculations. My problem is: I have 8 SP's with the following structure:
CREATE PROCEDURE [dbo].[SP_Name] @VarName decimal(18,2) OUTPUT as ...
CREATE TABLE @TempTable
Begin
Select ...
End
SET @VarName = Result
But the TempTable is always the same. No I am looking for a way to get all 8 values with only one stored procedure. My idea:
CREATE PROCEDURE [dbo].[SP_Name] @VarName decimal(18,2) OUTPUT as ...
CREATE TABLE @TempTable
---Get first value
Begin
Select ...
End
SET @VarName1 = Result
---Get second value
Begin
Select ...
End
SET @VarName2 = Result
...
How do i have to rewrite the line: ALTER PROCEDURE [dbo].[SP_Name] @VarName decimal(18,2) OUTPUT
ir can I even work with an array?