Set Operators

The SQL set operators manipulate the result sets of several queries combining the results of each query into a single result set.

Some parts in the output code are omitted for clarity reasons.

See Set operators

Set Operators in both Teradata and Snowflake have the same syntax and supported scenarios EXCEPT, INTERSECT, and UNION except for the clause ALL in the INTERSECT ALL, which is not supported in Snowflake, resulting in the portion of the ALL as a commented code after the conversion.

Teradata

IN -> Teradata_01.sql
SELECT LastName, FirstName FROM employees
INTERSECT
SELECT FirstName, LastName FROM contractors;

SELECT LastName, FirstName FROM employees
INTERSECT ALL
SELECT FirstName, LastName FROM contractors;

Snowflake

OUT -> Teradata_01.sql
SELECT
LastName,
FirstName FROM
employees
INTERSECT
SELECT
FirstName,
LastName FROM
contractors;

SELECT
LastName,
FirstName FROM
employees
INTERSECT
!!!RESOLVE EWI!!! /*** SSC-EWI-0040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE ***/!!! ALL
SELECT
FirstName,
LastName FROM
contractors;

Known Issues

1. INTERSECT ALL unsupported

The INTERSECT ALL is unsupported in Snowflake and then the part ALL will be commented.

  1. SSC-EWI-0040: Statement Not Supported.

Last updated