Jump to content

Recommended Posts

A while back I was trying to round some numbers to only 2 digits after the decimal in MSSQL.

 

I figured out how to do and wanted to share.

 

Name of Table: Invoice

Field Name: BalanceDue

 

Data Set:

100.0001

34.532

49.4732

234.567000

 

Expected Data Set:

100.00

34.53

49.47

234.57

 

To do this you can use the ROUND function within MSSQL.

 

select round(BalanceDue,2)
from Invoice

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×