Link to home
Start Free TrialLog in
Avatar of sath350163
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.

SELECT (CAST(636 AS DECIMAL(18,2))/80)/3
Result: 2.65000000

Open in new window


But I want only 1 decimal place in the result as 2.7

How do I achieve this?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial