我正在尝试执行表单的配置单元查询
with ( select a,b from some_db.some_table ) as my_subquery create table some_other_db.new_table as select * from my_subquery
我得到的错误
cannot recognize input near 'create' 'table' 'some_other_db' in statement
如何解决?
6kkfgxo01#
问题是在配置单元中,不能在with语句之后包含create语句。它们必须在with语句之前。以下查询有效:
with
create
create table some_other_db.new_table as with ( select a,b from some_db.some_table ) as my_subquery select * from my_subquery
1条答案
按热度按时间6kkfgxo01#
问题是在配置单元中,不能在
with
语句之后包含create
语句。它们必须在with
语句之前。以下查询有效: