Skip to Content
avatar image
Former Member

how to Declare multiple parameter in Stored Procedure

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 27 at 10:58 AM

    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

    Add comment
    10|10000 characters needed characters exceeded