-
Notifications
You must be signed in to change notification settings - Fork 861
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自动分表,当条件是日期等于一个日期的时候生成的语句不对 #1104
Comments
2881099
added a commit
that referenced
this issue
May 14, 2022
2881099
added a commit
that referenced
this issue
May 14, 2022
v3.2.650-preview20220515 可以了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
freesql版本v3.2.640
当条件为等于的时候自成的语句如下,应当生成那个月的,不应当所有的表都生成出来。
SELECT * from (SELECT t.* FROM (SELECT a."ID" as1, a."CREATED_BY" as2, a."CREATED_BY_NAME" as3, a."CREATED_TIME" as4, a."DATE" as5, a."ENTID" as6, a."OWNERID" as7, a."GOODSID" as8, a."PLACENUM" as9, b."PK" as10, b."ENTID" as11, b."GOODSID" as12, b."GOODSCODE" as13, b."GOODSNAME" as14, b."GOODSSPEC" as15, b."PLACE" as16, b."XYBM" as17, b."XYCJ" as18, b."MGOODCODE" as19
FROM "WORK_STORE_202205" a
INNER JOIN "VIW_GOODSDOC" b ON a."GOODSID" = b."GOODSID" AND a."ENTID" = b."ENTID"
WHERE (a."DATE" = to_timestamp('2022-05-14 00:00:00.000000','YYYY-MM-DD HH24:MI:SS.FF6'))
ORDER BY a."ID") 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."DATE" as5, a."ENTID" as6, a."OWNERID" as7, a."GOODSID" as8, a."PLACENUM" as9, b."PK" as10, b."ENTID" as11, b."GOODSID" as12, b."GOODSCODE" as13, b."GOODSNAME" as14, b."GOODSSPEC" as15, b."PLACE" as16, b."XYBM" as17, b."XYCJ" as18, b."MGOODCODE" as19
FROM "WORK_STORE_202204" a
INNER JOIN "VIW_GOODSDOC" b ON a."GOODSID" = b."GOODSID" AND a."ENTID" = b."ENTID"
WHERE (a."DATE" = to_timestamp('2022-05-14 00:00:00.000000','YYYY-MM-DD HH24:MI:SS.FF6'))
ORDER BY a."ID") 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."DATE" as5, a."ENTID" as6, a."OWNERID" as7, a."GOODSID" as8, a."PLACENUM" as9, b."PK" as10, b."ENTID" as11, b."GOODSID" as12, b."GOODSCODE" as13, b."GOODSNAME" as14, b."GOODSSPEC" as15, b."PLACE" as16, b."XYBM" as17, b."XYCJ" as18, b."MGOODCODE" as19
FROM "WORK_STORE_202203" a
INNER JOIN "VIW_GOODSDOC" b ON a."GOODSID" = b."GOODSID" AND a."ENTID" = b."ENTID"
WHERE (a."DATE" = to_timestamp('2022-05-14 00:00:00.000000','YYYY-MM-DD HH24:MI:SS.FF6'))
ORDER BY a."ID") t WHERE ROWNUM < 21) ftb
如果用 Between 则正常
The text was updated successfully, but these errors were encountered: