308 Star 2.4K Fork 902

GVPrunning-elephant / datart

 / 详情

Sql parse bug

待办的
创建于  
2024-04-09 14:42

version: 1.0.0-rc.3
SQL:SELECT (@i:=@i+1)"序号", a.*,case when 得分 <60 then '[0-59]' when 得分 >=60 and 得分 <70 then '[60-69]' when 得分 >=70 and 得分 <80 then '[70-79]' when 得分 >=80 and 得分 <90 then '[80-89]' when 得分 >=90 then '[>=90]' end as 得分区间 from ( SELECT sies.unit_name as 单位名称, IFNULL(sum(siesd.score), 0) as 得分, SUM(IF(siesd.indicator_name='2.1未设置独立档案库房', siesd.score, 0)) AS 2.1未设置独立档案库房, SUM(IF(siesd.indicator_name='2.2 档案库房选址、设计有存在危及档案安全的情况(如毗邻卫生间、食堂、开水间、配电房,库房内堆放杂物等情况)', siesd.score, 0)) AS 2.2 档案库房选址、设计有存在危及档案安全的情况(如毗邻卫生间、食堂、开水间、配电房,库房内堆放杂物等情况), SUM(IF(siesd.indicator_name='2.3档案装具存在木质柜、玻璃门柜等不符合档案安全保管的情况;使用档案密集架的不符合有关承重要求', siesd.score, 0)) AS 2.3档案装具存在木质柜、玻璃门柜等不符合档案安全保管的情况;使用档案密集架的不符合有关承重要求, SUM(IF(siesd.indicator_name='2.4未配备温湿度调控、温湿度计、消防、安防等设施设备,未满足库房“九防”管理要求', siesd.score, 0)) AS 2.4未配备温湿度调控、温湿度计、消防、安防等设施设备,未满足库房“九防”管理要求, SUM(IF(siesd.indicator_name='2.5(加分项)探索开展智能库房建设的加3分', siesd.score, 0)) AS 2.5(加分项)探索开展智能库房建设的加3分, SUM(IF(siesd.indicator_name='2.6 库房内进行数字化加工', siesd.score, 0)) AS 2.6 库房内进行数字化加工, SUM(IF(siesd.indicator_name='2.7 单位未与数字化加工服务企业签订保密协议', siesd.score, 0)) AS 2.7 单位未与数字化加工服务企业签订保密协议 FROM sg_indicator_examine_score as sies INNER JOIN sg_indicator_examine_score_detail as siesd on siesd.deleted = 0 and siesd.owner_id = sies.id INNER join ( SELECT sied.id, indicator_type_name as type_name FROM sg_indicator_examine_detail as sied WHERE sied.deleted = 0 and sied.indicator_examine_id = '1700074497564237825' ) as sied on sied.id = siesd.indicator_examine_detail_id and sied.type_name = '档案安全管理情况' WHERE sies.deleted = 0 and sies.unit_code = $UNIT_CODE$ GROUP BY sies.unit_name order by 得分 desc) a,(select @i:=0)j
DB: MYSQL
EXCEPTION:org.apache.calcite.sql.parser.SqlParseException: Lexical error at line 1, column 9. Encountered: "@" (64), after : ""

评论 (0)

aggron 创建了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
1074784 aggron 1578939599
TypeScript
1
https://gitee.com/running-elephant/datart.git
git@gitee.com:running-elephant/datart.git
running-elephant
datart
datart

搜索帮助