0

I'm new to Snowflake and currently trying to migrate some data into Snowflake for testing, and the db (Redshift) I'm migrating data from treats double-quoted identifiers as case-insensitive.

To ensure all our existing SQL queries also work in Snowflake, I ran this to force Snowflake to resolve all existing double quoted identifiers like it would for unquoted identifiers:

alter account set quoted_identifiers_ignore_case = true;

I'm now able to query against tables without having to specify double quotes around all the column names, but the issue is when I tried dropping a column from a table, Snowflake threw an error

alter table tbl drop column col;

SQL compilation error: column 'COL' does not exist

but these queries work and all resolve to "COL":

select col from tbl;
select "col" from tbl;
select "COL" from tbl;

Any input would be highly appreciated!!

sc123
  • 1
  • Did you create the table first or change quoted_identifiers_ignore_case first? – Eric Lin Nov 30 '21 at 05:16
  • Hi - if you read the documentation (https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html#controlling-case-using-the-quoted-identifiers-ignore-case-parameter) it states that if you set this parameter to TRUE then it will treat double-quoted identifiers as uppercase - it also provides very clear warnings about the impact of changing this parameter after creating identifiers – NickW Nov 30 '21 at 11:22

0 Answers0