Page 1 of 1

Check if the value is a number or not

Posted: Thu Aug 07, 2008 5:18 am
by dspxlearn
I have a field which can have values like '111.00','12','aaa'.
This field is defined as varchar field. I have to check if this field is a positive real numbers or not.

For values like '111.00','123.56' and '12' - i can convert into decimal values and can use the condition '>0'.
So, my concern is if i get a value like 'aaa', how do i check it?

Posted: Thu Aug 07, 2008 5:40 am
by ray.wurlod
Use the IsValid() function.

Posted: Thu Aug 07, 2008 6:56 am
by svga
Hi,

First find the length of that field. then
use oconv function with MCN option on the same field to pull only numeric values.if both the length match then ur field contains only numeric value otherwise it would have contain non numeric data.this ill work in server edition. im not sure abt px.

Posted: Thu Aug 07, 2008 3:10 pm
by ray.wurlod
Welcome aboard. Oconv() is not available in parallel jobs.