-
Notifications
You must be signed in to change notification settings - Fork 860
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
freesql Oracel 自动分表,当查询的日期在一个月内,但生成的sql 仍然 几个月的 #1099
Comments
实体 注解 [Table(Name = "sys_l_log_{yyyyMM}", AsTable = "CreatedTime=2022-1-1(3 month)")] |
同样的代码pgsql是正常的,生成的只有一条语句 |
收到,等会发布新版本 |
v3.2.631 |
freesql 3.2.630
Oracel 自动分表,当查询的日期在一个月内,但生成的sql 仍然 是查询几个月的 数据,生成的sql如下
SELECT * from (SELECT t.* FROM (SELECT a."ID" as1, a."CREATED_BY" as2, a."CREATED_BY_NAME" as3, a."CREATED_TIME" as4, a."REAL_NAME" as5, a."IP" as6, a."BROWSER" as7, a."OS" as8, a."DEVICE" as9, a."BROWSERINFO" as10, a."ELAPSED_MILLISECONDS" as11, a."STATUS" as12, a."MESSAGE" as13, a."RESULT" as14
FROM "SYS_L_LOG_202204" a
WHERE (a."CREATED_TIME" between to_timestamp('2022-05-01 00:00:00.000000','YYYY-MM-DD HH24:MI:SS.FF6') and to_timestamp('2022-05-12 21:26:31.639469','YYYY-MM-DD HH24:MI:SS.FF6'))
ORDER BY a."ID" DESC) t WHERE ROWNUM < 21) ftb
UNION ALL
SELECT * from (SELECT t.* FROM (SELECT a."ID" as1, a."CREATED_BY" as2, a."CREATED_BY_NAME" as3, a."CREATED_TIME" as4, a."REAL_NAME" as5, a."IP" as6, a."BROWSER" as7, a."OS" as8, a."DEVICE" as9, a."BROWSERINFO" as10, a."ELAPSED_MILLISECONDS" as11, a."STATUS" as12, a."MESSAGE" as13, a."RESULT" as14
FROM "SYS_L_LOG_202201" a
WHERE (a."CREATED_TIME" between to_timestamp('2022-05-01 00:00:00.000000','YYYY-MM-DD HH24:MI:SS.FF6') and to_timestamp('2022-05-12 21:26:31.639469','YYYY-MM-DD HH24:MI:SS.FF6'))
ORDER BY a."ID" DESC) t WHERE ROWNUM < 21) ftb
我的代码
The text was updated successfully, but these errors were encountered: