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 B8D2ED8901 for ; Sat, 10 Sep 2005 14:57:26 -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 67926-06 for ; Sat, 10 Sep 2005 17:57:24 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id D2125D88EF for ; Sat, 10 Sep 2005 14:57:24 -0300 (ADT) Received: (qmail 11192 invoked by uid 500); 10 Sep 2005 17:57:33 -0000 Date: Sat, 10 Sep 2005 12:57:33 -0500 From: Bruno Wolff III To: Michael Hoeller Cc: pgsql-sql@postgresql.org Subject: Re: how to have 2 select creteria on one column? Message-ID: <20050910175733.GA11142@wolff.to> Mail-Followup-To: Bruno Wolff III , Michael Hoeller , pgsql-sql@postgresql.org References: <200509101745.50847.MichaelHoeller@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509101745.50847.MichaelHoeller@t-online.de> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/111 X-Sequence-Number: 22658 On Sat, Sep 10, 2005 at 17:45:50 +0200, Michael Hoeller wrote: > Hello, > > I would like to select every row which has got in the column CODE a "k" > but I want to exclude every "kV" -- may be it is due to the fact that > it is Saturday and I work too long I don't get it.. I tried a > subselect, union but I struggle with the two select creteria on one > column. Your description isn't as precise as would be nice. But from what I can figure you want: code ~ '^k[^V]'