pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Hoeller <MichaelHoeller@t-online.de>
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
Message-ID: <200509101841.17950.MichaelHoeller@t-online.de> (raw)

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
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

view thread (4+ messages)  latest in thread

Message-ID: <200509101841.17950.MichaelHoeller@t-online.de>
Permalink:  ../200509101841.17950.MichaelHoeller@t-online.de/
Also on:    postgresql.org/message-id/200509101841.17950.MichaelHoeller@t-online.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: MichaelHoeller@t-online.de
  Subject: Re: Fwd: how to have 2 select creteria on one column? SOLVED
  In-Reply-To: <200509101841.17950.MichaelHoeller@t-online.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox