IQueryFilter subiqf = new QueryFilter(); subiqf.setWhereClause(fieldName+" In (SELECT "+fieldName+" FROM "+className.getName()+"GROUP BY "+fieldName+" HAVING Count(*)>1 )"); IFeatureCursor subresultCursor = className.search(subiqf, false); IFeature subif = subresultCursor.nextFeature();
IFeature subif = subresultCursor.nextFeature();
Solved! Go to Solution.
Hi Richard,
I too get the same situation. Here i uses "Inner Join", but it is not enabled as a function in add query layer in arcgis pro.
query:
select w.*, r.Total_plots from FGDABEDITZ40.SECTORTPSS AS w
Inner JOIN
(SELECT PLOTINTERNALID,SECTORTPSSNUMBER,COUNT(SECTORTPSSNUMBER) AS Total_plots FROM FGDABEDITZ40.PLOT GROUP BY SECTORTPSSNUMBER) AS r
ON w.SECTORTPSSNUMBER=r.SECTORTPSSNUMBER
The parentheses should be correct.
I think you are missing a space before the words GROUP BY and that the underlying SDE database parsing is not as forgiving as the parsing done by the personal geodatabase Microsoft Jet database engine.