Display exactly 2 digits after decimal without Rounding on SQL Server

let say, we had a value 7.35642132 on sql query return, then we want to display it only exactly 2 digits after decimal without Rounding, here is the way :

to get only two digits after decimal for a value 7.35642132
Select LTRIM(RTRIM(STR(7.35642132,10,2)))

the results is 7.35

Advertisements

About alamzyah
Name : Alamsyah Nick Name : Alamzyah Place of Birth : Jakarta, 04 June 1983 sex : Male Religion : Moslem Region : Jakarta, Indonesia Specialist : IT, Computer mail : alamzyah@gmail.com

10 Responses to Display exactly 2 digits after decimal without Rounding on SQL Server

  1. great post! ill be linking back! do you mind if i share this?

  2. Howdy I am so thrilled I found your internet site, I really located you by error, while I was seeking on Google for something else, Anyways I’m here now and would just like to say cheers for a remarkable post and a all round thrilling blog (I also love the theme/design), I don’t have time to appear over it all at the minute but I’ve bookmarked it and also included your RSS feeds, so when I’ve time I is going to be back to read far more, Please do maintain up the great job.

  3. I simply want to tell you that I am beginner to blogging and site-building and definitely enjoyed your blog site. Almost certainly I’m going to bookmark your blog post . You amazingly have incredible articles and reviews. Thanks a lot

  4. Lauren Tave says:

    I just want to tell you that I’m new to blogging and site-building and certainly liked your website. Very likely I’m planning to bookmark your site . You actually come with perfect stories. Regards for sharing your web page.

  5. This site can be a stroll-through for the entire data you wanted about this and didn’t know who to ask. Glimpse here, and you’ll positively uncover it.

  6. I think this is one of the most important info for me. And i’m glad reading your article. But want to remark on some general things, The web site style is wonderful, the articles is really great : D. Good job, cheers

  7. Would you be all in favour of exchanging hyperlinks?

  8. fantastic, I have a few problems though is it ok to post them here?

  9. Hello, i believe that i saw you visited my site so i came to “return the choose”.I’m trying to in finding issues to improve my site!I guess its good enough to make use of some of your ideas!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: