gp数据库(greenPlum)代码jdbc执行sql报错信息:
SQL state [0A000]; error code [0]; [Pivotal][Greenplum JDBC Driver][Greenplum]correlated subquery with skip-level correlations is not supported. ; nested exception is java.sql.SQLException: [Pivotal][Greenplum JDBC Driver][Greenplum]correlated subquery with skip-level correlations is not supported. |
---|
问题现象:
要查询原sql在库里可以执行,但是代码jdbc执行会报错。
sql如下:
select
(select
CASE
WHEN type = '12'
THEN (select a.area_id from dim.dim_area_relation a where a.utrancell_district_name=district_name)
WHEN type = '13'
THEN (select a.parent_area_id from dim.dim_area_relation a where a.utrancell_district_name=district_name)
ELSE '其他'
END DISTRICT_ID
from dim.dim_area_relation a
wh