Re: What should this query match?

From: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "Pgsql-sql(at)postgresql(dot)org" <Pgsql-sql(at)postgresql(dot)org>
Subject: Re: What should this query match?
Date: 2005-09-14 11:09:22
Message-ID: 1126696162.3675.21.camel@Panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Kraaijeveld(at)Askesis(dot)nl
web: www.askesis.nl

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Daryl Richter 2005-09-14 13:00:54 Re: Need help with 'unique parents' constraint
Previous Message Peter Eisentraut 2005-09-14 10:48:24 Re: What should this query match?