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

SQLParserUtils 拆分SqlServer 的sql时会去除最后的;导致运行报错 #5962

Closed
ruanwenjun opened this issue Jun 5, 2024 · 1 comment

Comments

@ruanwenjun
Copy link

使用SQLParserUtils.splitAndRemoveComment(sql, DbType.sqlserver) 拆分Merge sql会去除最后的分号

"merge xx select xx ;;";

导致运行的时候报错

com,microsoft,sglserver.idbc,soLSserverException;MERGE 语句必须以分号(;)结尾。
@ruanwenjun ruanwenjun changed the title SqlServer SQLParserUtils 拆分SqlServer 的sql时会去除最后的;导致运行报错 Jun 5, 2024
@lizongbo
Copy link
Collaborator

splitAndRemoveComment没有走完整的语法树解析逻辑,现在没维护这个了,不要使用它
自己解析得到 statment列表,然后再转字符串吧。

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