Skip to content
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 自动分表,查询报错 #1098

Closed
sukney opened this issue May 11, 2022 · 7 comments
Closed

oracle 自动分表,查询报错 #1098

sukney opened this issue May 11, 2022 · 7 comments

Comments

@sukney
Copy link

sukney commented May 11, 2022

freesql 版本3.2.610
生成如下语句,

SELECT t.* FROM (SELECT t.* FROM (SELECT * 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
ORDER BY a."ID" DESC) t WHERE ROWNUM < 21) ftb

UNION ALL

SELECT * 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
ORDER BY a."ID" DESC) t WHERE ROWNUM < 21) ftb

报如下错
image

@sukney
Copy link
Author

sukney commented May 12, 2022

相同的代码 pgsql 是正常的,oracle 生成的语句有问题。

@2881099
Copy link
Collaborator

2881099 commented May 12, 2022

确实,嵌套多层拼接有问题

@2881099
Copy link
Collaborator

2881099 commented May 12, 2022

v3.2.620 已发布

@sukney
Copy link
Author

sukney commented May 12, 2022

升级了 包出现兼容性问题了,编译通不过。
image

@2881099
Copy link
Collaborator

2881099 commented May 12, 2022

你玩把所有 freesql 相关 dll 都升级

@sukney
Copy link
Author

sukney commented May 12, 2022

都升级了

2881099 added a commit that referenced this issue May 12, 2022
@2881099
Copy link
Collaborator

2881099 commented May 12, 2022

刚查看了下,是发布版本的问题,等会重新发布

2881099 added a commit that referenced this issue May 13, 2022
@2881099 2881099 closed this as completed Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants