I'm trying to query a database, I need to get a list of clients where their weight is 60.5. The problem is that 60.5 is real, I have never requested a database with real in the where clause before.
I tried this:
SELECT Name FROM Customers WHERE Weight=60.5
SELECT Name FROM Customers WHERE Weight=cast(60.5 as real)
SELECT Name FROM Customers WHERE Weight=cast(60.5 as decimal)
SELECT Name FROM Customers WHERE Weight=convert(real,'60.5')
SELECT Name FROM Customers WHERE Weight=convert(decimal,'60.5')
These queries return 0, but in the Customers table there are 10 rows with weight = 60.5
source
share