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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't use Select statement to find float value....

Status
Not open for further replies.

handlesomething

Programmer
Aug 10, 2002
2
US
Statement:

Select * from my_table where col_3 = 7.15;

doesn't work---The column is a FLOAT type and there is a value in the table in col_3 of 7.15. Statement runs but returns an empty set.
 
Select * from my_table where col_3 = '7.15';
______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thanks for the reply, but I just found the answer elsewhere on the forum. The problem is that the FLOAT data type rounds the numbers. I needed to use the DECIMAL data type. ex. DECIMAL(4,2) which would allow for a decimal up to 99.99 with 2 decimal places.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top