Decimals truncation.


hi, i'm trying aritmethic numbers in sql server. application needs result must same 1 got in oracle because migrating databases. need solution problem. example:

operation:

(0.5/14.0)

oracle result:

0,0357142857142857142857142857142857142857

sql server result:

0.035714

 

operation in sql server:

  select round(convert(decimal(38,12),1234567890 * (1.0 - 0.5/14.0)),0)  

result:

1190476532.000000

 

operation in oracle:

  select round(1234567890 * (1.0 - 0.5/14.0),0) from dual  

result:

1190476180

 

i make sum of 50 millions of rows, result not same.

 

i need here. thank much.

 


 

  select (cast(0.5 as float)/14.0)  


SQL Server  >  SQL Server Migration



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607