Skip to Content
0
Former Member
May 22, 2009 at 06:25 AM

UDF help

17 Views

Hi,

I am writing a udf to assign a specific value when the incoming value is in a specific range.

The udf is

if ((i>=55201) && (i<=59999))

{

return ("X001")

}

if ((i>=65000) && (i<=67999))

{

return ("X002")

}

if ((i>=70000) && (i<=74999))

{

return ("X003")

}

when testing the mapping it is giving the following error:

operator >=cannot be applied to java.lang.String,int.

operator <=cannot be applied to java.lang.String,int.

If the value is between 55201 and 59999, i need to assign new value.

So that I have used >= and <= operators, but it is giving operator error.

Is there anyway to execute this condition.

Experts pls advise.

Thanks in advance..

Bala