雪花中的别名问题
Alias Name issue in SNowflake
我正在使用单个查询:
(SELECT *,'{"Source": "010","Keys": [{"Value": "CHARGE"}]}' AS ID1
FROM DETAILS) metrics
JOIN DIM.TYPE trant
ON metrics.ID1 = trant.BK_TRANSACTIONTYPE
但是我收到这个错误:
SQL compilation error: syntax error line 3 at position 30 unexpected
'metrics'.
请指教如何解决。
你能试试下面的查询吗?希望它有效:)
SELECT * FROM (SELECT *,'{"Source": "010","Keys": [{"Value": "CHARGE"}]}' AS ID1 FROM DETAILS) metrics JOIN DIM.TYPE trant ON metrics.ID1 = trant.BK_TRANSACTIONTYPE
我正在使用单个查询:
(SELECT *,'{"Source": "010","Keys": [{"Value": "CHARGE"}]}' AS ID1
FROM DETAILS) metrics
JOIN DIM.TYPE trant
ON metrics.ID1 = trant.BK_TRANSACTIONTYPE
但是我收到这个错误:
SQL compilation error: syntax error line 3 at position 30 unexpected 'metrics'.
请指教如何解决。
你能试试下面的查询吗?希望它有效:)
SELECT * FROM (SELECT *,'{"Source": "010","Keys": [{"Value": "CHARGE"}]}' AS ID1 FROM DETAILS) metrics JOIN DIM.TYPE trant ON metrics.ID1 = trant.BK_TRANSACTIONTYPE