|
版本: |
BeX5V3.5 |
小版本号: |
5.5113 |
|
|
数据库: |
MySQL |
服务器操作系统: |
Windows |
应用服务器: |
Tomcat |
客户端操作系统: |
Windows 7 |
浏览器: |
Chrome |
|
|
本帖最后由 181379280 于 2017-8-7 15:00 编辑
SQL代码:select k.fOrderACC as fOrderACC,k.fVehicleNo1 as fVehicleNo1,count(*) from (select distinct FI_DMSLoaderf.fWIP,FI_DMSLoaderf.fOrderACC,FI_DMSLoaderf.fVehicleNo1 from FI_DMSLoader FI_DMSLoaderf )k group by k.fVehicleNo1,k.fOrderACC
使用MYSQL工具可以正常执行,
写在KSQL里面,String kSql="select k.fOrderACC as fOrderACC,k.fVehicleNo1 as fVehicleNo1,count(*) from (select distinct FI_DMSLoaderf.fWIP,FI_DMSLoaderf.fOrderACC,FI_DMSLoaderf.fVehicleNo1 from FI_DMSLoader FI_DMSLoaderf )k group by k.fVehicleNo1,k.fOrderACC";
//执行select取得数据。Table是返回的数据集
com.justep.system.data.Table table1 = KSQL.select(kSql, null, "/customerTracker/CRM/data", null);
Iterator<com.justep.system.data.Row> rows1 = table1.iterator();
com.justep.system.data.Row row1;
出错如图:Caused by: java.lang.RuntimeException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: select k.fOrderACC as fOrderACC,k.fVehicleNo1 as fVehicleNo1,count(*) from (select distinct FI_DMSLoaderf.fWIP,FI_DMSLoaderf.fOrderACC,FI_DMSLoaderf.fVehicleNo1 from FI_DMSLoader FI_DMSLoaderf )k group by k.fVehicleNo1,k.fOrderACC
--> sql:
--> binds: []
at CRM.custom02(CRM.java:272)
|
|