Skip to content
Advertisement

Dividing by decimal values – rounding issue

I’m trying to divide two decimal values, in hope they will return the following; 1.132930.

However, SQL appears to be rounding the value to 1.132931.

The value returned before conversion is 1.1329305135951.

The SQL code i’m using is as follows:

Advertisement

Answer

You can round the value before the cast as following:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement