ALL & ANY array expressions

<> ALL & = ANY array expressions

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Description

An expression used to evaluate and compare each element of an array against a specified expression. (PostgreSQL Language Reference ANY & ALL (array))

Grammar Syntax

expression operator ANY (array expression)
expression operator ALL (array expression)

To support this expression SnowConvert translates the <> ALL to NOT IN and the = ANY to IN

Sample Source Patterns

Input Code:

IN -> PostgreSQL_01.sql
SELECT some_column <> ALL (ARRAY[1, 2, 3]) 
FROM some_table;

SELECT *
FROM someTable
WHERE column_name = ANY (ARRAY[1, 2, 3]);

Output Code:

OUT -> PostgreSQL_01.sql
SELECT some_column NOT IN (1, 2, 3)
FROM some_table;

SELECT *
 FROM someTable
 WHERE column_name IN (1, 2, 3);

Known Issues

There are no known issues

There are no related EWIs.

Last updated