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 CA0BDD88C3 for ; Sat, 10 Sep 2005 13:48:43 -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 50598-01 for ; Sat, 10 Sep 2005 16:48:41 +0000 (GMT) Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21]) by svr1.postgresql.org (Postfix) with ESMTP id 854EED8622 for ; Sat, 10 Sep 2005 13:48:40 -0300 (ADT) Received: from fwd19.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1EE8Wt-0004mg-01; Sat, 10 Sep 2005 18:48:39 +0200 Received: from pD9F8CA31.dip.t-dialin.net (X6T+xsZcge83LyOvPoW1Tj9HOuc0B0WEQn+TJivO1EZvDUqgjV0l6F@[217.248.202.49]) by fwd19.sul.t-online.de with esmtp id 1EE8Wd-061yVs0; Sat, 10 Sep 2005 18:48:23 +0200 From: Michael Hoeller Reply-To: Michael Hoeller To: pgsql-sql@postgresql.org Subject: Fwd: how to have 2 select creteria on one column? SOLVED Date: Sat, 10 Sep 2005 18:41:17 +0200 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_tywIDYNF2jcTNS9" Message-Id: <200509101841.17950.MichaelHoeller@t-online.de> X-ID: X6T+xsZcge83LyOvPoW1Tj9HOuc0B0WEQn+TJivO1EZvDUqgjV0l6F X-TOI-MSGID: 5ccaf972-4c83-47bd-b97c-ad5a78edd37b X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/109 X-Sequence-Number: 22656 --Boundary-00=_tywIDYNF2jcTNS9 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, sometime you have to write a mail and your brain gets cleared... select a.code from stamm a where a.skart in ( (select skart from stamm where code like '%k%') ) and a.code not like '%V%'; May be this is not nice but this brings back the list I have. Michael --Boundary-00=_tywIDYNF2jcTNS9 Content-Type: message/rfc822; name="forwarded message" Content-Transfer-Encoding: 7bit Content-Description: Michael Hoeller : how to have 2 select creteria on one column? Content-Disposition: inline From: Michael Hoeller Reply-To: Michael Hoeller To: pgsql-sql@postgresql.org Subject: how to have 2 select creteria on one column? Date: Sat, 10 Sep 2005 17:45:50 +0200 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509101745.50847.MichaelHoeller@t-online.de> 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. Can some one help me -- hope this is not a too stupid question. Normally google is my friend but also there I did not find a solution. Thanks a lot Michael --Boundary-00=_tywIDYNF2jcTNS9--