1
回答
druid merge sql error, dbType oracle, sql
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

@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

举报
顶部