|
楼主 |
发表于 2017-4-7 14:04:24
|
显示全部楼层
本帖最后由 棒棒糖 于 2017-4-7 14:12 编辑
sql = "select null as fParentID,1 as fLevel,false as fIsLeaves,fID,fName from "
+ TABLE_PROVINCE+" GROUP BY fID limit "+offset+","+limit;案例中这样的sql语法不能执行,group by语法用的不对不?
switch (level) {
case 1:
sql = "select null as fParentID,1 as fLevel,'false' as fIsLeaves,fID,fPrjYear as fName from "
+ TABLE_CBMP_TaskInfo+" GROUP BY fID limit "+offset+","+limit;
sqlWhere = "";
showTable = TABLE_CBMP_TaskInfo;
break;
case 2:
sql = "select fID as fParentID,2 as fLevel,'false' as fIsLeaves,"
+"concat_ws('-','"+parent+"',CONVERT(fID,char)) as fID,fPrjName as fName from "
+ TABLE_CBMP_TaskInfo+" where fID = "+parent+" GROUP BY fID limit "+offset+","+limit;
sqlWhere = "where fID = "+parent;
showTable = TABLE_CBMP_TaskInfo;
break;
case 3:
sql = "select fID as fParentID,3 as fLevel,'true' as fIsLeaves,"
+ "concat_ws('-','"+parent+"',CONVERT(fID,char)) as fID,fTaskName as fName from "
+ TABLE_CBMP_TaskInfo+" where fID = "+parent+" GROUP BY fID limit "+offset+","+limit;
sqlWhere = "where fID = "+parent;
showTable = TABLE_CBMP_TaskInfo;
break;
}
at java.lang.Thread.run(Thread.java:745)
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: select null as fParentID,1 as fLevel,'false' as fIsLeaves,fID,fPrjYear as fName from CBMP_TaskInfo GROUP BY fID limit 0,20, binds: []出错
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.SQL.select(Unknown Source)
at com.justep.system.data.SQL.select(Unknown Source)
at QualityManagement.queryCBMP_ProjectTaskTree(QualityManagement.java:48)
... 27 more
Caused by: java.sql.SQLException: ORA-00933: SQL 命令未正确结束我的报这错哦;
|
|