com.alibaba.druid.sql.parser.ParserException: syntax error, error in :‘xx)
程序员文章站
2022-06-22 20:33:43
先来看下 xml错误信息14:57:58.150 [http-nio-7070-exec-26] ERROR c.a.d.f.s.StatFilter - [mergeSql,149] - merge sql error, dbType oracle, druid-1.1.14, sql : SELECT *FROM (select check_code, check_name, chect_qualification_expires_time,CONCAT('Overdue_', remark...
先来看下 xml
错误信息
14:57:58.150 [http-nio-7070-exec-26] ERROR c.a.d.f.s.StatFilter - [mergeSql,149] - merge sql error, dbType oracle, druid-1.1.14, sql : SELECT *
FROM (select check_code, check_name, chect_qualification_expires_time,CONCAT('Overdue_', remark) explain
FROM JC_CHECK_INFO
WHERE chect_qualification_expires_time BETWEEN to_date(to_char(sysdate, 'yyyy-mm-dd'),'yyyy-mm-dd') AND to_date(to_char(sysdate+30, 'yyyy-mm-dd'),'yyyy-mm-dd')
ORDER BY chect_qualification_expires_time )a
UNION ALL
SELECT *
FROM (select check_code, check_name, chect_qualification_expires_time,CONCAT('Expired_', remark) explain
FROM JC_CHECK_INFO
WHERE to_date(to_char(sysdate, 'yyyy-mm-dd'),'yyyy-mm-dd') > chect_qualification_expires_time
ORDER BY chect_qualification_expires_time desc)b
com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'rk) explain
FROM JC_CHECK_INFO
', expect RPAREN, actual EXPLAIN pos 116, line 2, column 100, token EXPLAIN
at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:287)
at com.alibaba.druid.sql.parser.SQLParser.accept(SQLParser.java:295)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.parseTableSourcePrimary(OracleSelectParser.java:651)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.parseTableSource(OracleSelectParser.java:624)
先声明下sql是没有问题的,运行正常,在xml就会报以上错误信息,但是程序不受影响
sql运行正常,我也一直没找到原因,网上有的说是版本低的原因,解析不了,我…还就不信了,不换版本不行?
后来抱着试一试的心态,结果成功了。原因就是…不要偷懒!!!
取别名时乖乖加上 as 就没问题了
本文地址:https://blog.csdn.net/weixin_42599079/article/details/107665166
上一篇: 透过一千零一夜,看淘宝汇吃瞄准90后
下一篇: OA系统数据库Mysql服务无法启动
推荐阅读
-
error while loading shared libraries xx.so处理方法
-
PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
-
flume使用kafka sink报错syntax error或kafka channel输出数据抬头有乱码/奇怪字符
-
Command line option syntax error问题的解决方法小结
-
thinkphp6安装报错,composer install tp6 报错 Parse error: syntax error
-
pymysql.err.ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that co
-
mybatis java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax;
-
PHP Parse Error: syntax error, unexpected $end 错误的解决办法
-
JSON解析:com.alibaba.fastjson.JSONException: syntax error, expect {, actual string, pos xxx,...
-
Syntax error: Unterminated quoted string