[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

Truncate Decimal Places

I have a select statement that is returning a column in the format of a decimal like so

      7.00000000
     14.0000000

Is there a way to only return the value without the decimal places?   so the return result would be

      7
     14
0
chrisryhal
Asked:
chrisryhal
2 Solutions
 
Ephraim WangoyaCommented:

try using floor

select floor(fieldname)


test

declare @R real
set @r = 14.0000000

select  floor(@r)
0
 
jimyXCommented:
You can use Round:
Select Round(17.0000, 0)
0
 
chrisryhalAuthor Commented:
Thanks!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now