sath350163
asked on
Convert INT to DECIMAL with 1 digit Precision
Hello,
I'm trying to get a value with 1 digit precision when I do the below calculation:
((636/80)/3)
I tried casting the numerator as DECIMAL, but I get a final result with 8 decimal places as shown below.
But I want only 1 decimal place in the result as 2.7
How do I achieve this?
Thanks!
I'm trying to get a value with 1 digit precision when I do the below calculation:
((636/80)/3)
I tried casting the numerator as DECIMAL, but I get a final result with 8 decimal places as shown below.
SELECT (CAST(636 AS DECIMAL(18,2))/80)/3
Result: 2.65000000
But I want only 1 decimal place in the result as 2.7
How do I achieve this?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.