|
楼主 |
发表于 2017-10-31 15:25:00
|
显示全部楼层
还是不行,sqlserver的函数是DATEADD(DAY,-1,D2.fStart),其中DAY是增减维度关键字,但KSQL不能识别
KSQL:
- update AJCG_ContractDetail2 D2 set D2.fEnd = SQL.DATEADD(DAY,-1,D2.fStart) where D2.fMasterID = '03EC52961EBE465D92B7B50DE6010442' and D2.fContractStatus <> '财务审核通过'
复制代码 报错信息:
- Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: update AJCG_ContractDetail2 D2 set D2.fEnd = SQL.DATEADD(DAY,-1,D2.fStart) where D2.fMasterID = '03EC52961EBE465D92B7B50DE6010442' and D2.fContractStatus <> '财务审核通过'
- at com.justep.exception.BusinessException.create(Unknown Source)
- at com.justep.system.data.impl.TableUtilsImplement.ksqlUpdate(Unknown Source)
- at com.justep.system.data.impl.TableUtilsImplement.ksqlExecuteUpdate(Unknown Source)
- at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
- at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
- at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
- at Utils.MDMUtil.GenerateContract(MDMUtil.java:197)
- at FWCG.GenerateContract(FWCG.java:587)
- ... 26 more
- Caused by: com.justep.exception.BusinessException: 编码: JUSTEP154054; 提示: KSQL语法错误, DAY找不到对应的符号描述
- at com.justep.exception.BusinessException.create(Unknown Source)
- at com.justep.util.Utils.check(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
- at com.justep.system.ksql.node.IdentiferNode.accept(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
- at com.justep.system.ksql.node.LocalSqlFunctionNode.accept(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
- at com.justep.system.ksql.node.AssignNode.accept(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
- at com.justep.system.ksql.node.SetNode.accept(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
- at com.justep.system.ksql.node.UpdateSentence.accept(Unknown Source)
- ... 33 more
复制代码
|
|