List<TContentType> listall=new ArrayList<TContentType>();
listall=service.query("select distinct typeName,typeId from TContentType");我该怎么获取到listall里面的typeName 属性的值,不会写了,求指点
listall=service.query("select distinct typeName,typeId from TContentType");我该怎么获取到listall里面的typeName 属性的值,不会写了,求指点
网上也有更好的,可以自己去找找
public static List<ReportParamter> getBrandData(List list,String startsName) throws Exception {
List<ReportParamter> reportParamters = new ArrayList<ReportParamter>();
if(!StringUtil.isEmpty(startsName)){
for(Object obj : list){
if(obj instanceof ReportParamter){
ReportParamter rp = (ReportParamter)obj;
if(!StringUtil.isEmpty(rp.getParamId()) && rp.getParamId().indexOf(startsName)!=-1){
reportParamters.add(rp);
}
}
}
}
return reportParamters;
}
oracle的
怎么样抽取重复记录
select * from table t1 where where t1.rowed !=
(select max(rowed) from table t2
where t1.id=t2.id and t1.name=t2.name)
或者
select count(*), t.col_a,t.col_b from table t
group by col_a,col_b
having count(*)>1