解决: Error while compiling statement: FAILED: ParseException line 23:13 extraneous input '(' expectin

梦想的初衷 提交于 2020-05-08 20:21:10

1. hive 执行sql,报错:

 Error while compiling statement: FAILED: 
ParseException line 23:13 extraneous input '(' expecting ) near ')' in subquery source

2. sql 如下 :

SELECT
	pxx_id,
	pxxx_name,
	xxx,
	creationtime,
	creatorid,
	lastxxxxntime,
	lxxxierid,
	NULL,
	NULL,
    NULL 
FROM
	(
SELECT
	pxx_id,
	pxxx_name,
	xxx,
	creationtime,
	creatorid,
	lastxxxxntime,
	lxxxierid,
	NULL,
	NULL
	NULL Row_number ( ) OVER ( PARTITION BY xxx ORDER BY xxx DESC ) AS num 
FROM
	xxx.bxxxi_xxxts_xxxce 
	) bcp 
WHERE
	bcp.num = 1;

3. 解决:如下图,少一个逗号:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!