join question

From: Nathan Young <nyoung(at)asis(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: join question
Date: 2002-11-22 19:44:20
Message-ID: MHTPHEXXXSIELH1XSDBVSPOZYE9BA.3dde8914@inky
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all.

I have a table with members and a table with payments. Each payment is
related to a member by memberID and each payment has (among other things) a
year paid.

I can create a join to find a list of members who have paid for a given year
(2002 in this case):

select member.memberID,member.name from member, payment where
payment.memberID = member.memberID and payment.yearPaid = 2002

I would like to be able to get a list of members who have not paid for a
given year.

I would also like to combine the two criteria, for example to generate a list
of members who have paid for 2002 but not 2003.

Thanks in advance!

--->Nathan

---
(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*
(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*
---

Nathan Young
N. C. Young Design
(530)629-4176
http://ncyoung.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message mark carew 2002-11-22 21:50:35 Re: escape single quote in INSERT command
Previous Message Jeff Boes 2002-11-22 18:38:17 Re: escape single quote in INSERT command