>>>Hi Thomas, my main objective was optimizing disk storage size. The decimal precision requried for this data is definitely not going to be more than 4 digits. The largest value will not be more than 15 digits before the decimal. So a numeric field of 20,4 would handle all values. But this takes much more space than a double field type and hence my question.
...
>
>Thomas, I have decided on double as it is safer in my existing app. I found a "gotcha" with currency which is calculations with currency field type cause type problems which require CAST() to convert. Working with double field type keeps the fields as numeric type.
SET DECIMALS TO 4
CREATE CURSOR TD ;
( dDoub B;
, cTran C(25);
, cStr C(25) )
INSERT INTO TD (dDoub) VALUES (123456789012345.1234)
INSERT INTO TD (dDoub) VALUES (123456789012345.1254)
INSERT INTO TD (dDoub) VALUES (123456789012345.1257)
REPLACE ALL cTran WITH TRANSFORM(dDoub)
REPLACE ALL cStr WITH str(dDoub,20,5)
brow