>When I import from a CSV file then try to convert a string to a value, it seems to round it off.
>
>use ar
>APPEND FROM ar.csv csv
>
>I have a field called balance and if it is a Char field, then the number imports fine
>I get 4,464.25 left justified
>
>If I use numeric or currency I get 4.00
>
>So I want to convert character 4,464.25 left justified to a number
>If I use Val(Balance) if get 4.00
>
>I would think it has to do with Rounding but I can not seem to make it work right???
>
>Thanks
>Joel in Houston
No, the problem is the "," (comma). VAL() stops at the first non-numeric character, only 0-9, sign (+/-) and decimal point are valid.
You'll have to import this in two steps, one as the character field with the comma, and then a second step that transfers the character field and translates the comma to nothing into a numeric field.