Double to varchar conversion
Posted: Thu Dec 23, 2010 2:57 am
Hello Folks,
I am trying read a double value from MS SQL server table and to write it in a CSV file on UNIX. For converting that double value I have used DFloatToStringNoExp() function.
I have defined the scale to maximum of the values in that attribute.
I am getting some extra digits (not always same) at the end of number ..
i.e.
e.g. input - 0.880899999884498
output of function is - 0.88089999988449819
data type of input column is Double(15) and output is varchar(100).
Please suggest how to get rid of extra added digits.
Thanks & Regards,
Amarnath
I am trying read a double value from MS SQL server table and to write it in a CSV file on UNIX. For converting that double value I have used DFloatToStringNoExp() function.
I have defined the scale to maximum of the values in that attribute.
I am getting some extra digits (not always same) at the end of number ..
i.e.
e.g. input - 0.880899999884498
output of function is - 0.88089999988449819
data type of input column is Double(15) and output is varchar(100).
Please suggest how to get rid of extra added digits.
Thanks & Regards,
Amarnath