Re: What should this query match? - Mailing list pgsql-sql

From Joost Kraaijeveld
Subject Re: What should this query match?
Date
Msg-id 1126696162.3675.21.camel@Panoramix
Whole thread Raw
In response to Re: What should this query match?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: What should this query match?
List pgsql-sql
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 
> pattern matching operator, so I'd go back and check if your queries really 
> are what you think they should be.
Indeed, I am looking for a wildcard query, getting all records that are
smaller than lowercase Jan*. From your remark I gather that this is not
the correct syntax ;-).

Could you give me an example? I understand that the following query
returns all matches but I want everything smalle than the match

SELECT COUNT(*) FROM prototype.customers 
WHERE lower(lastName) ilike 'jan%' 

TIA
-- 
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl 




pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: What should this query match?
Next
From: Daryl Richter
Date:
Subject: Re: Need help with 'unique parents' constraint