开发者社区> 问答> 正文

druid merge sql error, dbType oracle, sql?报错

@wenshao 你好,非常感谢你提供的开源框架!

在实际应用中遇到了一个问题想跟你请教下,以下为错误信息:

版本:druid-0.2.26

报错信息: merge sql error, dbType oracle, sql : 

输出SQL:

SELECT SI_HOUSEBL_UUID,HOUSEBL_NAME,CODE,SCAC_CODE,SHPR_NME,SHPR_ADDR,SHPR_CITY,(SELECT DISTINCT CASE WHEN TRIM(A.UNLOCODE) IS NULL THEN A.GSP_CITY_LOCAL_NME || ',' || A.GSP_COUNTRY || ',' || B.POSTAL_CDE ELSE '#' || A.UNLOCODE END AS UNLOCODE FROM GSP_CITY A LEFT JOIN GSP_POSTAL_CDE B ON A.GSP_CITY_UUID = B.GSP_CITY_UUID WHERE A.GSP_CITY_UUID = SHPR_CITY_UNLOCODE) AS SHPR_CITY_UNLOCODE,SHPR_PHONE,SHPR_TELE,CNEE_NME,CNEE_ADDR,CNEE_CITY,(SELECT DISTINCT  CASE WHEN TRIM(A.UNLOCODE) IS NULL THEN A.GSP_CITY_LOCAL_NME || ',' || A.GSP_COUNTRY || ',' || B.POSTAL_CDE ELSE '#' || A.UNLOCODE END AS UNLOCODE FROM GSP_CITY A LEFT JOIN GSP_POSTAL_CDE B ON A.GSP_CITY_UUID = B.GSP_CITY_UUID WHERE A.GSP_CITY_UUID = CNEE_CITY_UNLOCODE) AS CNEE_CITY_UNLOCODE,CNEE_PHONE,CNEE_TELE,NTFY_NME,NTFY_ADDR,NTFY_CITY,(SELECT DISTINCT  CASE WHEN TRIM(A.UNLOCODE) IS NULL THEN A.GSP_CITY_LOCAL_NME || ',' || A.GSP_COUNTRY || ',' || B.POSTAL_CDE ELSE '#' || A.UNLOCODE END AS UNLOCODE FROM GSP_CITY A LEFT JOIN GSP_POSTAL_CDE B ON A.GSP_CITY_UUID = B.GSP_CITY_UUID WHERE A.GSP_CITY_UUID = NTFY_CITY_UNLOCODE) AS NTFY_CITY_UNLOCODE,NTFY_PHONE,NTFY_TELE,NTFY1_NME,NTFY1_ADDR,NTFY1_CITY,(SELECT DISTINCT  CASE WHEN TRIM(A.UNLOCODE) IS NULL THEN A.GSP_CITY_LOCAL_NME || ',' || A.GSP_COUNTRY || ',' || B.POSTAL_CDE ELSE '#' || A.UNLOCODE END AS UNLOCODE FROM GSP_CITY A LEFT JOIN GSP_POSTAL_CDE B ON A.GSP_CITY_UUID = B.GSP_CITY_UUID WHERE A.GSP_CITY_UUID = NTFY1_CITY_UNLOCODE) AS NTFY1_CITY_UNLOCODE,NTFY1_PHONE,NTFY1_TELE,STP_NME,STP_ADDR,STP_CITY,(SELECT DISTINCT  CASE WHEN TRIM(A.UNLOCODE) IS NULL THEN A.GSP_CITY_LOCAL_NME || ',' || A.GSP_COUNTRY || ',' || B.POSTAL_CDE ELSE '#' || A.UNLOCODE END AS UNLOCODE FROM GSP_CITY A LEFT JOIN GSP_POSTAL_CDE B ON A.GSP_CITY_UUID = B.GSP_CITY_UUID WHERE A.GSP_CITY_UUID = STP_CITY_UNLOCODE) AS STP_CITY_UNLOCODE,STP_PHONE,STP_TELE,SHPR_POSTALCODE,CNEE_POSTALCODE,NTFY_POSTALCODE,NTFY1_POSTALCODE,STP_POSTALCODE FROM SI_HOUSEBL WHERE SI_BASIC_UUID = ?

异常详细:

com.alibaba.druid.sql.parser.ParserException: syntax error, expect FROM, actual RPAREN UNLOCODE
at com.alibaba.druid.sql.parser.SQLExprParser.accept(SQLExprParser.java:1377)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.methodRest(OracleExprParser.java:507)
at com.alibaba.druid.sql.parser.SQLExprParser.primaryRest(SQLExprParser.java:600)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primaryRest(OracleExprParser.java:677)
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:561)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primary(OracleExprParser.java:477)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:109)
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:319)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primary(OracleExprParser.java:477)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:109)
at com.alibaba.druid.sql.parser.SQLSelectParser.expr(SQLSelectParser.java:415)
at com.alibaba.druid.sql.parser.SQLSelectParser.parseSelectList(SQLSelectParser.java:269)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.query(OracleSelectParser.java:267)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.select(OracleSelectParser.java:88)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.select(OracleSelectParser.java:73)
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:373)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primary(OracleExprParser.java:477)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:109)
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:183)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primary(OracleExprParser.java:477)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:109)
at com.alibaba.druid.sql.parser.SQLSelectParser.expr(SQLSelectParser.java:415)
at com.alibaba.druid.sql.parser.SQLSelectParser.parseSelectList(SQLSelectParser.java:269)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.query(OracleSelectParser.java:267)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.select(OracleSelectParser.java:88)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:166)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:107)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:102)
at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:52)
at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:145)
at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:629)
at com.alibaba.druid.filter.stat.StatFilter.statementPrepareAfter(StatFilter.java:305)
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:124)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:311)
at com.coscon.mail.helper.DBHelper.executeQuery(DBHelper.java:96)
at com.coscon.mail.helper.XmlHelper.createXmlStr(XmlHelper.java:55)
at com.coscon.mail.helper.MailHelper.buildMailBody(MailHelper.java:29)
at com.coscon.mail.TestMain.main(TestMain.java:20)
2013-9-12 16:17:02 com.alibaba.druid.filter.stat.StatFilter error

展开
收起
爱吃鱼的程序员 2020-06-22 16:50:11 1182 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    @<spanstyle="font-weight:bold;font-family:微软雅黑,Verdana,sans-serif,宋体;line-height:normal;background-color:#FFFFFF;"><atarget="_blank"rel="nofollow">katori<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;line-height:normal;background-color:#FFFFFF;"> 

    2020-06-22 16:50:27
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_樊文凯_ORACLE数据库和应用异构迁移最佳实践 立即下载
PostgresChina2018_王帅_从Oracle到PostgreSQL的数据迁移 立即下载
Oracle云上最佳实践 立即下载

相关镜像