Numeric to Big Integer
>>---BIGINT----(--numeric-expression--)------------------------><
String to Big Integer
>>---BIGINT----(--string-expression--)-------------------------><
The BIGINT function returns a big integer representation of:
Numeric to Big Integer
If the argument is a numeric-expression, the result is the same number that would occur if the argument were assigned to a big integer column or variable. If the whole part of the argument is not within the range of big integers, an error is returned. The fractional part of the argument is truncated.
String to Big Integer
If the argument is a string-expression, the result is the same number that would result from CAST( string-expression AS BIGINT). Leading and trailing blanks are eliminated and the resulting string must conform to the rules for forming a floating-point, integer, or decimal constant. If the whole part of the argument is not within the range of big integers, an error is returned. Any fractional part of the argument is truncated.
The result of the function is a big integer. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
Syntax alternatives: The CAST specification should be used for maximal portability. For more information, see CAST specification.
SELECT BIGINT(SALARY) FROM EMPLOYEE
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.