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

db2 select item 中存在IDENTITY关键字时,解析出错 #1328

Closed
leezongjie opened this issue Jul 13, 2016 · 1 comment
Closed

db2 select item 中存在IDENTITY关键字时,解析出错 #1328

leezongjie opened this issue Jul 13, 2016 · 1 comment
Milestone

Comments

@leezongjie
Copy link

由于历史项目原因,有个表中的字段名称为IDENTITY,同样也是db2关键字,这样我们在分析语句:
SELECT ID,IDENTITY,BUSICODE FROM BUSINESS_ENTERPRISE_BUSIINFO WHERE SYSCODE= '603' ORDER BY INTIME desc FETCH first 1 rows only

时出错,分析到IDENTITY时认为是关键字,便无法解析了,但是该语句在db2中的执行时没有问题的,db2会分析上下文环境来判断该字段是不是关键字。
目前我们临时添加了引号来避免该问题,如下:
SELECT ID, “IDENTITY”, BUSICODE FROM BUSINESS_ENTERPRISE_BUSIINFO
也在新开发项目中避免使用关键字作为表字段。

在select item的分析中,仅仅通过匹配关键字的方式就认为是关键字好像不太合理。

@wenshao wenshao added this to the 1.0.23 milestone Jul 15, 2016
@wenshao
Copy link
Member

wenshao commented Jul 15, 2016

已支持,请等待1.0.23版本吧

@wenshao wenshao closed this as completed Jul 15, 2016
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