Actually I have a user defined table type (for use as a table valued variable) which I Referencing the stored procedure that effectively calls only two other stored procedures, then incorporates those values into the table type.
ID
Tetable value (var1, var2, var3, var4, var5) EXEC [dbo]. StoredProcedure1; INSERT @tableValuedVariable (var1, var2, var5) EXEC [DBO] .standard processor 2;
You might already know what I'm going to ask. Actually stored Procedure2 returns only a few values that are set to capture the table, and I want to clear those other variables right now (defined as the default) only SQL is complaining that I Not specifying all the variables available in that table.
Returns the dataset can be quite large, so I want to avoid the loop and for this obvious reasons.
Thanks for any help.
You list all the columns in the INSERT section to match all the columns stored proc.
Now, if the stored proc returns var1, var2, var5
, then there will be no need to specify any var3, var4
INSERT section if they tap If so (Edit: Definitely, as Mike Burton has said, if the columns are not, it will fail)
If the collected return var1, var2, var3, var4, var5
you need all 5 in the INSERT section: You can not ignore the columns from the stored proc and can allow them in the default.
Comments
Post a Comment