Snowflake - Syntax error for a correct query
This code actually errors out in DataGrip but it's syntactically correct
WITH test_cte AS (
SELECT
1 AS test
UNION DISTINCT
SELECT
2
)
SELECT
*
FROM test_cte
;
Please sign in to leave a comment.
Hi,
Thank you for reporting it. I've created a separate ticket to support this case: DBE-26228.
As a workaround to be able to execute the statement successfully without the EOF exception, you can right-click the query and select Execute Selection as Single Statement. This option is available since 2026.1.