Teradata 14 has released many Domain Specific Functions. Now we are discussing about new Numeric functions which are equivalent to Oracle.
The following numeric functions are available in this Teradata 14 release.
Example for all functions.
SELECT
SIGN(-123) as SIGN
, TRUNC (32.976) as TRUNC
, ROUND(345.175) as ROUND
, GREATEST(12,56,10.1, 155.6) as GREATEST
, LEAST (12,56,10.1, 155.6) as LEAST
, TO_NUMBER ('4769.96', '9999.99') as TO_NUMBER
, CEIL( 5.4) as CEIL
, FLOOR(3.86) as FLOOR
;
The following numeric functions are available in this Teradata 14 release.
Name | Description |
---|---|
SIGN | It returns the sign of a value |
TRUNC | It will truncate a numeric value |
ROUND | It will round a numeric value |
GREATEST | It return the highest value from a list of given values |
LEAST | It return the lowest value from a list of given values |
TO_NUMBER | It convert a string to a number via a format string |
CEILING | It return the smallest integer not less than the input parameter |
FLOOR | It return the largest integer equal to or less than the input parameter |
Example for all functions.
SELECT
SIGN(-123) as SIGN
, TRUNC (32.976) as TRUNC
, ROUND(345.175) as ROUND
, GREATEST(12,56,10.1, 155.6) as GREATEST
, LEAST (12,56,10.1, 155.6) as LEAST
, TO_NUMBER ('4769.96', '9999.99') as TO_NUMBER
, CEIL( 5.4) as CEIL
, FLOOR(3.86) as FLOOR
;