ToInteger

Summary

The ToInteger function converts numeric values and numeric strings to an Integer.

Syntax

ToInteger(<numeric or numeric string>)

Return Type

Integer

Details

The minimum Integer value is -2147483648 and the maximum Integer value is 2147483647. ToInteger will truncate any decimals found in the input parameter.

Examples

select ToInteger(1299.77), TypeNameOf(ToInteger(1299.77))
from Empty();

tointeger_01

select ToInteger(10), TypeNameOf(ToInteger(10))
from Empty();

tointeger_02

Related Functions

ToDecimal

ToDouble

ToFloat