|
楼主 |
发表于 2018-3-1 08:59:58
|
显示全部楼层
String sql = "select fUser,fProductType,sum(fSubsidyAmount) as fSubsidyAmount from COA_TripSubsidy where 1=1";
if (filter!=null) {
sql =sql+ " and"+filter;
}
sql+=" group by fUser,fProductType";
HashMap<String, String> sqlmap = new HashMap<String, String>();
sqlmap.put(SQL.DEFAULT_DB_NAME, sql);
Table table = SQL.select(sqlmap, null, "/CLDD_NEW/CLDDSC/data");
table.getProperties().put(Table.PROP_NAME_ROWID, "COA_TripSubsidy");
这样显示列名"COA_TripSubsidy"不存在是不是要select fID作为返回的主键
|
|