Skip to Content
0

how to Declare multiple parameter in Stored Procedure

Feb 27 at 07:17 AM

14

avatar image
Former Member

I have created SP As below. when I am giving more then one parameter in @CC and @ACC . the SP is not executing.Please help me to solve this issue.

Declare @fromdate date,@todate date,@cc varchar(max),@acc varchar(max)

Declare @Dbname varchar(max)

if @dbname='database1'

Begin

insert into #temp_pl Exec database1..table1 @fromdate,@todate,@cc,@acc

End

select * from #temp_pl

thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Johan Hakkesteegt Feb 27 at 10:58 AM
0

Hi,

Please execute the query in MS SQL Management Studio, to see the error. Then correct the query, and test again, until it works. Then put it back into SP.

Regards,

Johan

Share
10 |10000 characters needed characters left characters exceeded