Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 query

Author  Topic 

gagani
Posting Yak Master

112 Posts

Posted - 2012-05-13 : 09:29:04
when I run a query, I am getting a column output as
100.0000
123.0000
234.0000

How to get the precision to two decimal places, that is
100.00
123.00
234.00

and also how to get the output as
100
123
234

vijays3
Constraint Violating Yak Guru

354 Posts

Posted - 2012-05-13 : 09:32:04
what query are you running ?

you need to convert the result into decimal (10,2).

Vijay is here to learn something from you guys.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-13 : 14:28:10
quote:
Originally posted by gagani

when I run a query, I am getting a column output as
100.0000
123.0000
234.0000

How to get the precision to two decimal places, that is
100.00
123.00
234.00

and also how to get the output as
100
123
234



you've to do convertion for achieving this.
Also if its possible you can try to do it at front end as its kind of presentation issue

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -