Real number being stored strangely in sql server 2k

liunx

Guest
hey guys. i'm back again w/another q.

any idea why sql server 2k seems to like storing some of my reals not exactly how i tell it to?

for example:

99.5 gets stored as 99.5
99.7 gets stored as 99.69997

any thoughts?That does seem very odd.

The only thing that comes to mind would be to check your precision on that column.
Not sure exactly what to look for for sure, but maybe something will pop out at you.hmmm now that i'm looking at it it appears to be storing it correctly in the db. must be some weird coldfusion thing. dunno.try using numberFormat(number, mask) or dollarFormat(number) to guide CF into what you expect. Just make sure to account for null/ non numeric values, or CF will error out when it tries to format them.
 
Back
Top