[SQL] What should this query match?

2005-09-14 Thread Joost Kraaijeveld
Hi, Should the follwing query match a record with just Jan in the column (there are no nulls in the column and there are 2 records with only Jan in it) ? SELECT COUNT(*) FROM customers WHERE lower(lastName) lower('Jan%') If so, and if the result of the previous question is 144660, should

Re: [SQL] What should this query match?

2005-09-14 Thread Joost Kraaijeveld
On Wed, 2005-09-14 at 12:48 +0200, Peter Eisentraut wrote: 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

Re: [SQL] What should this query match?

2005-09-14 Thread Peter Eisentraut
Am Mittwoch, 14. September 2005 13:09 schrieb Joost Kraaijeveld: Could you give me an example? I understand that the following query returns all matches but I want everything smalle than the match If you need that then you will need to use two separate conditions, one for less-than and one for