X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0A944D8E4C for ; Wed, 14 Sep 2005 08:09:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72360-05 for ; Wed, 14 Sep 2005 11:09:21 +0000 (GMT) Received: from obelix.askesis.nl (laudanum.demon.nl [82.161.125.16]) by svr1.postgresql.org (Postfix) with ESMTP id 5EE0AD6FD1 for ; Wed, 14 Sep 2005 08:09:20 -0300 (ADT) Received: obelix.askesis.nl 172.31.0.1 from 172.31.1.8 172.31.1.8 via HTTP with MS-WebStorage 6.0.6249 Received: from Panoramix by obelix.askesis.nl; 14 Sep 2005 13:09:22 +0200 Subject: Re: What should this query match? From: Joost Kraaijeveld To: Peter Eisentraut Cc: "Pgsql-sql@postgresql.org" In-Reply-To: <200509141248.24909.peter_e@gmx.net> References: <1126691657.3675.5.camel@Panoramix> <200509141248.24909.peter_e@gmx.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 14 Sep 2005 13:09:22 +0200 Message-Id: <1126696162.3675.21.camel@Panoramix> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.087 required=5 tests=[AWL=0.037, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/149 X-Sequence-Number: 22696 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