druid SQL SERVER 某些SELECT 语句解析出现错误,但是语句执行没有问题

falq053o  于 2022-10-22  发布在  Druid
关注(0)|答案(2)|浏览(286)

执行一下语句查询出现错误:

SQL:

SELECT A.value FROM A oost LEFT JOIN B oo WITH (NOLOCK) ON oost.order_id = oo.id

错误信息:

syntax error, error in :'OCK) ON oost.order_id = oo',expect ON, actual ON pos 99, line 1, column 97, token ON at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:280) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:385) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:78) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.SQLUtils.format(SQLUtils.java:236) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.logging.LogFilter.logExecutableSql(LogFilter.java:569) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.logging.LogFilter.statementExecuteQueryAfter(LogFilter.java:514) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:468) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:182) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228) [druid-1.1.2.jar:1.1.2] at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:688) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:629) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:680) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:712) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:722) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:772) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE]

bakd9h0s

bakd9h0s1#

问题已经修复,等下一个版本吧,也许就在下个周末

cgvd09ve

cgvd09ve2#

谢谢

相关问题