X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 57002329E6E for ; Fri, 8 Oct 2004 04:03:16 +0100 (BST) 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 45817-05 for ; Fri, 8 Oct 2004 03:03:12 +0000 (GMT) Received: from brown.ursa-minor.com (brown.ursa-minor.com [66.152.196.41]) by svr1.postgresql.org (Postfix) with ESMTP id 222FE329EF9 for ; Fri, 8 Oct 2004 04:03:11 +0100 (BST) Received: from localhost (brown.ursa-minor.com [127.0.0.1]) by brown.ursa-minor.com (Postfix) with ESMTP id CBBFA2DE961 for ; Thu, 7 Oct 2004 23:03:08 -0400 (EDT) Received: from brown.ursa-minor.com ([127.0.0.1]) by localhost (brown.ursa-minor.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28636-08 for ; Thu, 7 Oct 2004 23:03:08 -0400 (EDT) Received: from [66.152.196.55] (grizzly.ursa-minor.com [66.152.196.55]) by brown.ursa-minor.com (Postfix) with ESMTP id 8ECD52DE95F for ; Thu, 7 Oct 2004 23:03:08 -0400 (EDT) Message-ID: <4166036B.1020001@murrain.net> Date: Thu, 07 Oct 2004 23:03:07 -0400 From: Michelle Murrain Reply-To: mmurrain@dbdes.com User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: help on a query Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at ursa-minor.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/45 X-Sequence-Number: 19148 Hi all, This is one of those things I know I should know, but it's not coming to me. It's probably really simple. I have two related tables, registrations and receipts, related by the field registration_id. So registrations looks kinda like: registration_id bigint (primary key) foo varchar(10) bar varchar(20) and receipts looks like: receipt_id bigint (primary key) registration_id bigint (foreign key) amount float baz varchar(10) If someone has paid, there is a row in the receipts table for that registration ID#. I need to find a list of the registration IDs that *don't* have an entry in the receipts table. Thanks in advance!!! -- .Michelle -------------------------- Michelle Murrain mmurrain at dbdes dot com 413-222-6350 ph 617-889-0929 ph 952-674-7253 fax <--- new Page: pageme@murrain.net AIM:pearlbear0 ICQ:129250575 Skype: pearlbear Jabber: pearlbear@transactim.net "I see all the different religious traditions as paths for the development of inner peace, which is the true foundation of world peace. These ancient traditions come to us as a gift from our common past. Will we continue to cherish it as a gift and hand it over to the future generations as a legacy of our shared desire for peace?" - His Holiness the Dalai Lama