F
F
FedOTs2014-10-22 05:08:41
SQL Server
FedOTs, 2014-10-22 05:08:41

Wrong conversion in MSSQL 2008 r2 from float(6) to int ?

Found a strange problem in MSSQL We
execute the code:
select CAST(cast(4.43 as float(6))*100 as int)
Result 442 ???
At the same time, the same code
select CAST(cast(5.43 as float(6))*100 as int)
Result 543
Please explain where is the logic here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FedOTs, 2014-10-22
@FedOTs

Decided so
But still the question remains. Why MSSQL so strangely converts?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question