AlbertKim247
Programmer
I'm trying to populate a field of datatype float, with cost data from a varchar(30) field. The cost data is a string that looks like "999.99". When I select this cost data and insert into a float field, the resulting value in the float field looks like "999.99000000000001".
I think this issue has to do with implicit conversions, but I'm trying to find a workaround. Is there a way to insert a value like "999.99" into the float field as "999.99"?
Here are a couple similar examples using the Northwind database in SQL Server 2000 where I'd like to see the results look like "999.99", but they don't.
select top 10 cast('999.99' as float) from orders
select top 10 convert(float (1), '999.99') from orders
I think this issue has to do with implicit conversions, but I'm trying to find a workaround. Is there a way to insert a value like "999.99" into the float field as "999.99"?
Here are a couple similar examples using the Northwind database in SQL Server 2000 where I'd like to see the results look like "999.99", but they don't.
select top 10 cast('999.99' as float) from orders
select top 10 convert(float (1), '999.99') from orders