Click to See Complete Forum and Search --> : Data Storage Problem


nik_flash
09-30-2003, 02:08 AM
hi all
I have a problem, when I query from a table some attribute. It shows me a values 22.22. But when I get it into a Pro*C. The values changes to 22.2199. Can any body tell me the reason why this is happening. I dont want to use any rounding function while storing the value in DB. Can it be done at DB level that whatever value is being stored is returned back without any conversion.

jmodic
09-30-2003, 03:08 AM
Your values are stored in the database with full precision, but your querying client tool is configured to round the retrieved numbers.

nik_flash
09-30-2003, 03:40 AM
Originally posted by jmodic
Your values are stored in the database with full precision, but your querying client tool is configured to round the retrieved numbers.

It is stored in db as 12000000000.22 not as 12000000000.219999.Actually I have found that it starts misbehaving for larges values.Like I faced this problem for 12000000000.22. Surprisingly it's showing correct result for 12000000000.44 0r 12000000000.33 . Its only giving problem when I update that value by 12000000000.22 or 12000000000.55. Since I have updated it with exact value ie. 12000000000.22,so it should give me the same value in Pro*C as well, moreover why only these two values give me wrong results.