Anitivirus
IS-IT--Management
Hi,
I have a user defined function which has 5 parametes to pass, now while running the UDF using hardcoded parametes value its taking only 10 seconds , but while running the UDF by declaring the parametes value and
assigned them value its taking more than 3 minutes.
here is the example
First case
select * from UDF_Test('A',76,'C',987,''X')
This one taking only 10 minutes to run.
Second case
Declare @P1 varchar,
@P2 Int,
@P3 varchar,
@P4 int,
@P5 varchar
SET @P1 = 'A'
@P2= 76
@P3='C'
@P4 = 987
@P5='X'
Select * from UDF_Test(@P1,@P2,@P3,@P4,@P5)
Any help will be appreciated.
Thanks