可以使用IQueryFilterDefinition里的PostfixClause来实现SQL语句里的group by, order by等的功能。
例如:
IQueryFilter pQueryFilter =new QueryFilterClass();
pQueryFilter.subfield="qsdwdm,qsxz,dlbm,sum(mj) as mj,sum(tkmj) as tkmj"
pQueryFilter.whereclause="";
(IQueryFilterDefinition)qf.PostfixClause="group by qsdwdm,qsxz,blbm order by blbm ";
IFeautureClass fc=OpenFeatureClass(LayerName);
IFeautureCursor feacur= fc.search(qf,false);
实现了Select qsdwdm,qsxz,dlbm,sum(mj) as mj
from tab
where 1=1
group by xxx
order by YYY
的格式的SQL语句的语法