8000 text是关键字,mysql数据源查询字典code中直接输入sql语句无法执行问题 · Issue #3881 · jeecgboot/jimureport · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
text是关键字,mysql数据源查询字典code中直接输入sql语句无法执行问题 #3881
Open
@Sarahdeng620

Description

@Sarahdeng620
版本号:

1.9.4

问题描述:

积木要求:
4.2.通过SQL字典,字典code中直接输入sql语句
需要输入SELECT查询SQL,且值为value,文本为text才能识别。
例如:SELECT username AS value, realname AS text FROM sys_user

连接starrock数据源(mysql),text是关键字必须写成text需要带飘号,才能执行,因为text是关键字的原因
select store as value, title as text from edu_dict

错误日志&截图:

操作失败,StatementCallback; bad SQL grammar [SELECT dict.text,dict.value FROM (select wh as 'value', 'wh' as text from test.inv_main_wh_detail_d group by wh ) dict LIMIT 10 ]; nested exception is java.sql.SQLSyntaxErrorException: Getting syntax error at line 1, column 13. Detail message: No viable statement for input 'dict.text'.

text是否可以用其他别名 text_value替代,解决关键字问题

重现步骤:

友情提示(为了提高issue处理效率):

  • 积木报表是一款免费报表产品,功能免费源码不开放;
  • 未按格式要求发帖,会被直接删掉;
  • 请针对问题提供[报表设计配置或SQL脚本]或在官网制作报表示例并提供ID;
  • 针对不好重现的问题,请录制操作视频或详细的重现步骤;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0