FieldNotLikePredicate

Posts   
 
    
Kris Nobels avatar
Posts: 118
Joined: 02-Apr-2008
# Posted on: 09-May-2009 10:59:31   

Hey there,

I would like to create a filter like this in SQL

select * from log where message not like '%test%'

In the documentation i found the FieldLikePredicate and the result is this.

                  filter.AddWithAnd(LogFields.Exception % string.Format("%{0}%", s))
                        .AddWithOr(LogFields.Message % string.Format("%{0}%", s));

But how do you create the Not Like with LLBL gen ?

Kris

rdhatch
User
Posts: 198
Joined: 03-Nov-2007
# Posted on: 09-May-2009 23:56:23   

myFilter.Negate = True

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-May-2009 20:18:06   

Yep. You need to use the FieldLikePredicate constructor. Or use a FieldLikePredicate varialbe and then set the _Negate _property to true.

David Elizondo | LLBLGen Support Team