Operators

Vertica Operators

Cast coercion operator

Operator use if want to return:

  • NULL instead of an error for any non-date/time data types

  • NULL instead of an error after setting EnableStrictTimeCasts

( Vertica SQL Language Reference Coercion operator )

To replicate this functionality SnowConvert translates this operator to the TRY_CAST function.

Sample Source Patterns

Input Code:

IN -> Vertica_01.sql
SELECT
    measurement_id,
    reading::!FLOAT AS measurement_value
FROM raw_measurements;

Output Code:

OUT -> Vertica_01.sql
SELECT
    measurement_id,
    TRY_CAST(
    reading AS FLOAT) AS measurement_value
FROM
    raw_measurements;

Last updated