|
|
Archives of the TeradataForum
Message Posted: Thu, 17 Nov 2005 @ 15:42:51 GMT
Subj: | | Re: Intelligent rounding off |
|
From: | | Wardius, Mark |
David,
If the first digit to the right of the decimal is odd it rounds up, if it is even it rounds down. Is that by design?
sel 12345.15 (dec(6,1)) 12345.2
;sel 12345.25 (dec(6,1)) 12345.2
;sel 12345.35 (dec(6,1)) 12345.4
;sel 12345.45 (dec(6,1)) 12345.4
;sel 12345.55 (dec(6,1)) 12345.6
;sel 12345.65 (dec(6,1)) 12345.6
;sel 12345.75 (dec(6,1)) 12345.8
;sel 12345.85 (dec(6,1)) 12345.8
;sel 12345.95 (dec(6,1)) 12346.0
Mark Wardius
| |