Am Mittwoch, 14. September 2005 11:54 schrieb Joost Kraaijeveld:
> Why do the following queries return the same count (may be related to
> the first question)
>
> SELECT COUNT(*) FROM customers
> WHERE lower(lastName) < lower('Jan%')
>
> SELECT COUNT(*) FROM customers
> WHERE lower(lastName) <= lower('Jan%')
These queries should return the same answer if the query does not contain the
value 'Jan%' (or differently capitalized versions). I suspect that you are
actually attempting to use % as a wild card, but none of your queries use a
pattern matching operator, so I'd go back and check if your queries really
are what you think they should be.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/