Page 1 of 1

Validation of Integer value

Posted: Tue Jul 24, 2007 12:31 am
by dsguy
Hi

I have a requirment where input is comes as string and i have to convert it to integer.If Input string dosent have proper number value then the record to be replaced with 0.
Please let me know ifr there is any function through which we can validate if it is a interger value or not.

ex
Input string Output
5423 5423
54ab3 0


Thanks for ur help

Posted: Tue Jul 24, 2007 1:29 am
by Maveric
try using Convert function and change all integer values to blank. if it is a number then your output will be blank. If it is not then u will have the alphabets. Check the length of the output of the convert function. if it is zero direct mapping else 0.

Posted: Tue Jul 24, 2007 1:50 am
by balajisr
You can also use Num function.

Code: Select all

 if Num(inLink.Col) then inLink.Col else 0

Posted: Tue Jul 24, 2007 4:04 am
by ray.wurlod
Best is the parallel function IsValid().