TO_FLOAT()

Scalar. Converts a given value to a floating point value.

Syntax

TO_FLOAT( value )
Parameter

value

The value to convert. A String converts based on the format for a Float literal. An Interval returns a value representing a number of microseconds. A Timestamp returns a value representing the number of microseconds from the epoch (midnight, January 1, 1970 UTC). Timestamps prior to the epoch convert to a negative value.

Data Types

Return

value

Float

Integer

Long

Float

Interval

Timestamp

String

Example

The following example takes the integer value of NumContracts, converts it to a Float and then multiplies it by the floating point number 100:

INSERT INTO OutStream
SELECT 100.0 * TO_FLOAT(Trades.NumContracts)
FROM Trades;