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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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