Skip site navigation (1) Skip section navigation (2)

Re: A and C not B

From: "Chad Thompson" <chad(at)weblinkservices(dot)com>
To: "Reshat Sabiq" <sabiq(at)purdue(dot)edu>,"pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: A and C not B
Date: 2002-09-11 22:55:51
Message-ID: 012d01c259e6$61533b70$32021aac@chad (view raw or flat)
Thread:
Lists: pgsql-novice
  ----- Original Message ----- 
  From: Reshat Sabiq 
  To: Chad Thompson 
  Sent: Wednesday, September 11, 2002 4:45 PM
  Subject: Re: [NOVICE] A and C not B


  select * from x where y in('A', 'B');



  Thats not quite what i want.  Finding A and B are easy as they are in the table.  Finding C is easy because it is not.  But if i want one list of B and C, thats a little harder.  Meaning B which is listed in the table as type B, and C which is not in the table at all.

  I believe I will need something like
  select * from lists l, tiers t
  where l.number = t.number
  and t.tier = B
  or t.tier <> A

  This example obviously doesnt work but maybe it gives a better explanation of what i am looking for.

  Thanks
  Chad

In response to

pgsql-novice by date

Next:From: Oliver ElphickDate: 2002-09-12 04:36:02
Subject: Re: Upgrade or install 7.2.2 on SuSE 8.0
Previous:From: Chad ThompsonDate: 2002-09-11 22:51:29
Subject: Re: A and C not B

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group