Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percentage field with 4 decimal

Status
Not open for further replies.

AppDev76

Programmer
Jun 8, 2004
65
US
Hi,
I have a percentage field in one of my tables. I set the data type to float, I wan't 4 decimal places and the data in the table has 4 decimals, but when I run a query in query analyzer it returns: 4.4999999999999998E-2 instead of 0.045.
How can I fix this?
 
Float is not an exact datatype, you should convert it to decimal in your query or in your table if you can.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top