SetOperator.In How do do NotIn ?

Posts   
 
    
Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 16-Sep-2011 16:41:41   

adapter,v2.6,vs2010

I have statement below but want to use SetOperator.In how do i do SetOperator.NotIn

bucket.PredicateExpression.Add(New FieldCompareSetPredicate(VwCustomerFields.CustomerId, Nothing, VwResellerCustomerFields.CustomerId, Nothing, SetOperator.NotEqual, (VwResellerCustomerFields.ResellerId = ResellerID)))

This is what i want to do.... Select * from customers where Cstomerid not in (select custmerid from customers where type=9)

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-Sep-2011 20:31:58   

There is an overload with a "negate" parameter. Just set it to true:

filter.Add(FieldCompareSetPredicate(CustomerFields.CustomerID, null,  OrderFields.CustomerID, null, 
     SetOperator.In, null, true)));


David Elizondo | LLBLGen Support Team