>>I am trying to do a [replace all] for cField = ***** (Numeric overflow) but I get a error cause ***** has no quotes and isn't a number
>>
>>Yes it is a numeric field and has overflow that looks like ****
>
>Hi, Stephen
>
>... for cField>val(replicate('9',fsize('cField')))
>
>bye
This wont work if the field has decimals, ie N(10,3)
Have to write a function to determine max value to do it with a replace like that.
Something like this should work.
PROCEDURE maxval
LPARAMETERS size, dec
LOCAL cNum
cNum = REPLICATE('9', dec)
cNum = "." + m.cNum
cNum = REPLICATE('9', m.Size - (m.dec + 1)) + m.cNum
RETURN VAL(m.cNum)