Snowflake:如何过滤包含空格的 "field name"?它在 select 语句中工作正常但在 whereclause 过滤器中不工作

Snowflake: How to filter on a "field name" that contains spaces? It works fine in select statement but not in whereclause filter

这段代码工作正常:

SELECT distinct "Line Status" from TEMP_TS_SUBSCR_ACCT_CUST_INFO;

但是这段代码returns错误:

SELECT * from TEMP_TS_SUBSCR_ACCT_CUST_INFO where "Line Status" = "Active";

SQL 编译错误:错误行 1 在位置 66 无效标识符 '"Active"'

有什么地方不对请指教。

String literals 应该用 '$$:

括起来
SELECT * 
FROM TEMP_TS_SUBSCR_ACCT_CUST_INFO 
WHERE "Line Status" = 'Active'; 
-- WHERE "Line Status" = $$Active$$;

包含空格(此处为列名)的 identifiers 需要双引号。