Hi goose,
and thanks for your help! Well, I read both articles and I can see that they address the same matter. Though I'm not sure how to use the FieldCompareSetPredicate (Subquery) in my case, as I would have to retrieve the values I'm looking for from the same table. After all I believe that this might be possible because the help file states:
compares the entity field specified with the set of values defined by the subquery elements, using the SetOperator specified. The FieldCompareSetPredicate is the predicate you'd like to use when you want to compare a field's value with a range of values retrieved from another table / view (or the same table / view) using a subquery
The help file gives the following example:
SELECT Customer.CustomerID IN (SELECT CustomerID FROM Orders WHERE Employee=2)
// C#
filter.Add(new FieldCompareSetPredicate(
CustomerFields.CustomerID, OrderFields.CustomerID,
SetOperator.In, (OrderFields.EmployeeID == 2)));
But what I need would be to formulate a recursive query like
List<string> myCustomerIDs; //can have thousands of values
SELECT Customer.CustomerID IN (SELECT CustomerID FROM Customer WHERE CustomerID=myCustomerIDs)
Maybe anybody can please help me on that?
Thank you!
Ingmar