0
votes

I am trying to use a where exists subquery as follows:

WITH FILTER AS(
SELECT    matchingvalues
FROM      (VALUES ('This'),('Any')) filter(matchingvalues)
),
SRC AS (
SELECT   Column_A
        ,Column_B
FROM     (VALUES ('This','1'),('That','2'))SRC(Column_A,Column_B)
)
SELECT   *
FROM     SRC
WHERE    EXISTS (   SELECT   1
                    FROM     FILTER
                    WHERE    Column_A = matchingvalues
                    OR       matchingvalues = 'Any'
                )

This works in T-sql but not in snowflake and returns the following error:

"SQL compilation error: Unsupported subquery type cannot be evaluated"

1

1 Answers

1
votes

This issue has been fixed in the latest version of Snowflake (which is 3.56). This version will be released in this week or the next. You can verify the release from the following portal:

https://support.snowflake.net/s/topic/0TO0Z000000Unu5WAC/releases