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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...