![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 10 Nov 2009 @ 13:47:12 GMT
If you start with a decimal (or float) and want a numeric result, casting to character and back is inefficient. Arithmetic is better. For two decimal places:
my_decimal MOD 1.00
or, if you want the result to look like an integer,
cast(my_decimal MOD 1.00 * 100 as integer)
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||