TO_INTEGER()

Scalar. Converts a given value to an Integer value.

Syntax

TO_INTEGER( value )
Parameter

value

The value to convert. Numeric values return the integer portion of the value. Values outside the valid range for an integer, or non-numeric characters in a string value, return NULL.

Data Types

Return

value

Integer

Integer

Long

Float

String

Example

The following example uses the integer portion of the result of dividing the value in the Price column by 9:

INSERT INTO OutStream
SELECT TO_INTEGER(Trades.Price/9.0)>=5
FROM Trades;