SSC-EWI-RS0005
Column aliases cannot be used in the IN clause.
Severity
High
Description
This conversion issue is added because the column aliases cannot be used in the IN clause of the PIVOT/UNPIVOT
query in Snowflake.
Code Example
Input Code:
SELECT *
FROM count_by_color UNPIVOT (
cnt FOR color IN (red AS r, green AS g, blue AS b)
);
Output Code:
SELECT *
FROM
count_by_color UNPIVOT (
cnt FOR color IN (red
!!!RESOLVE EWI!!! /*** SSC-EWI-RS0005 - COLUMN ALIASES CANNOT BE USED IN THE IN CLAUSE OF THE PIVOT/UNPIVOT QUERY IN SNOWFLAKE. ***/!!! AS r, green
!!!RESOLVE EWI!!! /*** SSC-EWI-RS0005 - COLUMN ALIASES CANNOT BE USED IN THE IN CLAUSE OF THE PIVOT/UNPIVOT QUERY IN SNOWFLAKE. ***/!!! AS g, blue
!!!RESOLVE EWI!!! /*** SSC-EWI-RS0005 - COLUMN ALIASES CANNOT BE USED IN THE IN CLAUSE OF THE PIVOT/UNPIVOT QUERY IN SNOWFLAKE. ***/!!! AS b)
);
Recommendations
If you need more support, you can email us at [email protected]
Last updated