‎2008 May 21 2:14 PM
i want to compare one character field to numeric,
i got one field from some custom developed fm the field having the p_value
is of type c(30) , i want to compare this value to numeric 50000 if i use the following code it
does not give the correct value. please help
if p_value GE '50000'
‎2008 May 21 2:19 PM
‎2008 May 21 2:18 PM
Hi,
data:
w_int type i,
w_char(13) type c.
w_int = w_char.
if w_int ge 50000.
ur code
endif.
‎2008 May 21 2:19 PM
‎2008 May 21 2:20 PM
when you compare character value to numeric it compared from left to right not considering the length of both the variables.
Which means you will have to something like:
if p_value GE '000000000000000000000000050000'
this should give you the correct result.