|
public static void basic_contractProcessBeforeImportExcelAfterAction() {
String ksql1 = "UPDATE basic_contract_temp basic_contract_temp SET basic_contract_temp.BusinessManagerID =
IF(basic_contract_temp.BusinessManagerID='',NULL,basic_contract_temp.BusinessManagerID)";
String ksql2 = "INSERT INTO basic_contract bc(bc.BusinessManagerID,bc) SELECT * FROM basic_contract_temp bct";
KSQL.select(ksql1, null, "/ncpms/basic_contract/data", null);
KSQL.select(ksql2, null, "/ncpms/basic_contract/data", null);
执行上面的sql就报下面的错,找不到问题所在,麻烦帮着看下。下面是控制台报的错:
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: UPDATE basic_contract_temp basic_contract_temp SET basic_contract_temp.BusinessManagerID =IF(basic_contract_temp.BusinessManagerID='',NULL,basic_contract_temp.BusinessManagerID)
--> sql:
--> binds: []
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
at com.justep.system.data.KSQL.select(Unknown Source)
at Basic_contractProcess.basic_contractProcessBeforeImportExcelAfterAction(Basic_contractProcess.java:99)
... 37 more
Caused by: com.justep.exception.KSQLException: 编码: JUSTEP154115; 提示: KSQL语法错误, ^^UPDATE basic_co中未找到需要的元素, 位置0期望是SELECT
at com.justep.exception.KSQLException.create(Unknown Source)
at com.justep.system.ksql.token.TokenManager.matchToken(Unknown Source)
at com.justep.system.ksql.token.TokenManager.match(Unknown Source)
at com.justep.system.ksql.parser.AbstractParser.selectSentenceNode(Unknown Source)
at com.justep.system.ksql.parser.QueryParser.start(Unknown Source)
at com.justep.system.ksql.parser.QueryParser.start(Unknown Source)
at com.justep.system.ksql.parser.AbstractParser.parse(Unknown Source)
|
|