how do I do a "Not in" sql statement with Predicates?

Posts   
 
    
Brian
User
Posts: 10
Joined: 14-Jan-2005
# Posted on: 21-Oct-2005 18:06:45   

hello all,

got 2 tables - and I've posted on these before - GraphicObjects & PropertyValuesForGraphics - each Graphic has many Properties. I want to do this sql statement:

select graphicobject_id from graphicobject where graphicobject_id not in (select graphicobject_id from propertyvaluesforGraphic where Property_Name = 'SourceField.Property')

unfortunately most search engines consider both not and in words to not search for confused

I think I'm being dense on this one - any help appreciated. Thanks, Brian

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 21-Oct-2005 18:50:25   

Hmmm... Good question considering the SetOperator enum doesn't have a NotIn value.

Perhaps you just have to use IN and inverse your expression.

BOb

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Oct-2005 19:01:10   

Pass 'true' for the negate parameter in one of the constructor overloads. This is the method used in all predicates.

Frans Bouma | Lead developer LLBLGen Pro