Conversion Operators SQL Functions

The following conversion functions take a single input sequence and produce the result sequence of the desired type.

seq_integer( input ) Convert float sequence elements to integer
seq_real( input ) Convert integer sequence elements to float

Example

Following is an example code snippet demonstrating the conversion functions:

         
    -- seq_integer, seq_real
            
     
    INSERT INTO SimpleSequence(testNumber,fVal1)
        VALUES(7,'{4.9,10.3,13.7}');
    INSERT INTO SimpleSequence(testNumber,iVal1)
        VALUES(8,'{3,5,7,11,13}');
     
    SELECT fVal1, seq_integer(fVal1) AS "int" FROM SimpleSequence WHERE testNumber = 7;
    SELECT iVal1, seq_real(iVal1) AS "real" FROM SimpleSequence WHERE testNumber = 8;
     
    fVal1{}
    int{}
    ------------------------------------------------------------------------------
    {4.900000, 10.300000, 13.700000}
    {4, 10, 13}
     
    iVal1{}
    real{}
    ----------------------------------------------------------------------------
    {3, 5, 7, 11, 13}
    {3.000000, 5.000000, 7.000000, 11.000000, 13.000000}