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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 trunc function

Author  Topic 

jenanabanana
Starting Member

1 Post

Posted - 2005-03-16 : 04:45:22
hi, ive a problem with a query i've created. the query returns 5.00% but i need to use the trunc function to trim it down to 5.0% but i can't figure out how to do that as part of the query.

any help appreciated

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 05:18:03
read about math functions in BOL = Books online = sql server help
select ROUND(ColumnName, 1) as ColumnName

floor, convert(decimal(10,1), ColumnName) or some other might be useful for you.

what is your columns datatype?

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -