hive执行正确,hive-jdbc 别名 报语法错误

SQL在hive中执行是正确的,但是使用hive-jdbc ResultSet rs = st.executeQuery(sql) 执行,却在别名处报语法错误
图片说明

SQL:
SELECT
aa.customerid
FROM
(
(SELECT
customerid
FROM
oder
WHERE saleno = 101870
AND orderstatus NOT IN (1000, 1007, 1008)
AND obcustomertype != 1004
AND source = 1001
AND zipcode != 'null') as aa
LEFT JOIN
(SELECT
customerid
FROM
oder
WHERE saleno IN (
101345,
101955,
101000,
101099,
101362
)
AND orderstatus NOT IN (1000, 1007, 1008)
AND obcustomertype != 1004
AND source = 1001
AND zipcode != 'null') as bb
ON aa.customerid = bb.customerid
)
WHERE bb.customerid IS NULL

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问