August 14, 2008 at 2:44 pm
I have a simple question, I am trying to execute a storedproc the following way which has about 5 input parameters.
SQL:
Execute storedproc
Select col1,col2,col3,col4,col5 from #Temp
I am passing in col1,col2,col3,col4,col5 as parameters. I am getting the follow error:
Msg 201, Level 16, State 4, Procedure storedproc, Line 0
Procedure 'storedproc' expects parameter '@param1', which was not supplied.
Thanks for your responses!!
August 14, 2008 at 7:34 pm
Mh (8/14/2008)
I have a simple question, I am trying to execute a storedproc the following way which has about 5 input parameters.SQL:
Execute storedproc
Select col1,col2,col3,col4,col5 from #Temp
I am passing in col1,col2,col3,col4,col5 as parameters. I am getting the follow error:
Msg 201, Level 16, State 4, Procedure storedproc, Line 0
Procedure 'storedproc' expects parameter '@param1', which was not supplied.
Thanks for your responses!!
How many variables are declared in your store procedure? did you try using this ...
EXECUTE storedproc col1,col2,col3,col4,col5
"-=Still Learning=-"
Lester Policarpio
August 14, 2008 at 8:01 pm
Select @col1 = col1, @col2 = col2, @col3 = col3, @col4 = col4, @col5 = col5
from #Temp
Execute storedproc @col1, @col2, @col3, @col4, @col5
But why not just use #Temp inside if that procedure?
Use whole # table as a table-parameter.
Whatever you insert into #Table before calling SP will be accessible from inside SP.
_____________
Code for TallyGenerator
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply