-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracle 分析函数解析错误,between 关键字丢失 #4094
Comments
请提供重新问题的SQL语句 |
SQL 没变,还是原来的SQL,但是输出结果 between 关键字没有了 @Test
public void testSqlPars() {
// 此sql可以正常执行
String sql ="SELECT B.CUSTOMER_ID customerId,B.CN_NAME NAME,OPENING_DATE,CLOSING_DATE,count(A.OPENING_DATE) over (partition BY B.CUSTOMER_ID ORDER BY trunc(A.OPENING_DATE,'mm') RANGE BETWEEN interval '3' month (4) preceding AND CURRENT ROW) AS createCount,count(A.CLOSING_DATE) over (partition BY B.CUSTOMER_ID ORDER BY trunc(NVL(A.CLOSING_DATE,SYSDATE),'mm') RANGE BETWEEN interval '3' month (4) preceding AND CURRENT ROW) AS cancelCount,row_number () over (partition BY B.CUSTOMER_ID ORDER BY trunc(A.OPENING_DATE) DESC) AS row_flg FROM account_info A,CUSTOMER_INFO B WHERE A.CUSTOMER_ID=B.CUSTOMER_ID";
System.out.println(SQLUtils.format(sql, DbType.oracle));
} |
wenshao
added a commit
that referenced
this issue
Dec 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
感谢修复,现在没报错了,但貌似引入了一个新但bug ,format 以后 BETWEEN 关键字丢失了
Originally posted by @neozo in #4059 (comment)
The text was updated successfully, but these errors were encountered: