Set Operators
The SQL set operators that manipulates the result sets of several queries combining the results of each query into a single result set.
See Set operators
Set Operators in both Teradata and Snowflake have the same syntax and supported scenarios EXCEPT, INTERSECT, and UNION with the exception of 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
SELECT LastName, FirstName FROM employees
INTERSECT
SELECT FirstName, LastName FROM contractors;
SELECT LastName, FirstName FROM employees
INTERSECT ALL
SELECT FirstName, LastName FROM contractors;Snowflake
SELECT LastName, FirstName FROM PUBLIC.employees
INTERSECT
SELECT FirstName, LastName FROM PUBLIC.contractors;
SELECT LastName, FirstName FROM PUBLIC.employees
INTERSECT
-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **
-- ALL
SELECT FirstName, LastName FROM PUBLIC.contractors;Known Issues
1. INTERSECT ALL unsupported
The INTERSECT ALL is unsupported in Snowflake and then the part ALL will be commented.
Related EWIs
MSCEWI1040 - The statement is not supported in Snowflake.
Last updated
Was this helpful?