I can't figure out how to build the FieldCompareSetPredicate for the SQL here
SQL:
..
AND r.RevID IN (SELECT MAX(RevID) FROM tableA GROUP BY DocID)
..
where r is an alias for tableA
This is what I have so far
VB.NET:
inClauseRevision = New FieldCompareSetPredicate(TableAFields.RevId, Nothing, TableAFields.RevId.SetAggregateFunction(AggregateFunction.Max), Nothing, SetOperator.In, subFilter, relationsIN)
and it renders the following SQL:
[DBName].[dbo].[TableA].[RevID]
IN (SELECT MAX([DBName].[dbo].[TableA].[RevID]) AS [RevId]
FROM [DBName].[dbo].[TableA] )
How do I add the Group By part to this FieldCompareSetPredicate ? Thanks.