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"