[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE : [back-sql] Problem with NOT search requests (ITS#2652)



>
>I don't think this problem can be easily overcome.
>I can easily figure out a simple query that does this
>if the filter is of the type (!<ava>); if the filter
>is (!<complex filter>) things get much more involved.
>We might have to live with it.
>
>p.

Did you consider nested queries ?
For example, for the search filter (!telephonenumber=<a value>), 
we would get candidates with the following query :
'select distinct persons.id from persons where not persons.id 
      in (select persons.id from persons, phones where
          phones.phone='<a value>' and persons.id=phones.id)'
This may be a generic way to process not filters, though this may 
generate complex SQL queries.

Emmanuel.