Subject | Re: [IBO] Adding OR condition to where clause |
---|---|
Author | Geoff Worboys |
Post date | 2001-05-01T02:29:53Z |
> So simply adding a real OR condition (AddSqlWhereOR)The problem becomes; OR with what?
> would throw away my special handlings of this situation,
> isn't?
If you have a simple single search value entered it is easy:
(A='Standard') OR (A='Special')
but if there were multiple search values provided you get:
(A='Standard') AND (B='something') OR (A='Special')
which if memory serves me correctly is the same as:
((A='Standard') AND (B='something')) OR (A='Special')
but you may have wanted:
(A='Standard') AND ((B='something') OR (A='Special'))
or more probably:
(B='something') AND ((A='Standard') OR (A='Special'))
If you start adding more OR clauses the situation rapidly gets a lot
worse.
I am not saying that it is not possible, however I suspect that any
such extensions would still be restricted in what can be achieved.
Geoff Worboys
Telesis Computing