Rounding down DECIMAL(14,3) to third decimal digit in SQL 2008

Posted by abatishchev on Stack Overflow See other posts from Stack Overflow or by abatishchev
Published on 2009-08-20T19:14:00Z Indexed on 2010/06/13 12:12 UTC
Read the original article Hit count: 379

Filed under:
|
|
|

I have to round down all incoming data with type DECIMAL(14,3) which has 3 decimal digit to the last one. I.e.:

100; 100.0; 100.00; 100.000 -> 100
100.2; 100.02; 100.20; 100.22 -> 100.xx

but

100.221 -> 100.22
100.229 -> 100.22

Using which SQL operator can I check that residue of division in decimal digit is greater then zero?

© Stack Overflow or respective owner

Related posts about sql

Related posts about tsql