• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1010
  • Last Modified:

MSSQL 2005: Round formula to two decimal places not working

Hi All,

I have the following formula;

(((Variable_A*1.0) - (Variable_B*1.0)) / 1000 ) * (Variable_C*1.0)

But the results have seven number after the decimal place.

My question is how do i round this to two.

I tried ROUND((((Variable_A*1.0) - (Variable_B*1.0)) / 1000 ) * (Variable_C*1.0) ,2), but it didn't work.

1 Solution
SharathData EngineerCommented:
Check this
CONVERT(DECIMAL(10,2),(((Variable_A*1.0) - (Variable_B*1.0)) / 1000 ) * (Variable_C*1.0))

Open in new window

detox1978Author Commented:
great thanks.

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now