Formatting a decimal value in SQL SERVER 2008

I know SQL Server 2008 doesn't have the "Format" command. Is there a way of truncating zeroes after a decimal point?

Who is Participating?
Vitor MontalvãoMSSQL Senior EngineerCommented:
You can ROUND() a decimal to an integer.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
None that I'm aware of, other than CASTing the value with the appropriate number of decimal places.
Give us a data mockup of what you're trying to pull off here.
Edit:  Drat... took too long typing!

Agreed more details would help, but have you tried ROUND()? Despite the name, the 3rd param can be used to truncate, rather than round. For example, both of these

SELECT ROUND(748.58, 0, 1)
SELECT ROUND(748.00, 0, 1)

Would produce:

BlakeMcKennaAuthor Commented:
Thanks guys...that worked!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.