pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frans de Wet <Frans@Playful.com>
To: pgsql-sql@postgreSQL.org
Subject: Retrieving the record not matched with a join.
Date: Wed, 31 Mar 1999 22:53:49 +0200
Message-ID: <000101be7bb8$93709360$0101a8c0@carolina> (raw)
In-Reply-To: <19990331171611.B12083@kfs.org>

Hi,

I have two tables, A and B.  A contains records which includes an ID or one
of the records in table B.

A would typically contain the fields:

IDA
IDB
DATA1
DATA2

and B:

IDB
DATA3
DATA4

I have several records in both but a few of the records in A has a IDB field
which does not point to a valid record in B (the record has been deleted).

I know how to get all the records in A that have existing records in B.
SELECT * FROM A, B WHERE A.BID = B.BID.

Now my question ... How do I get the records in A that DO NOT have existing
records in B ???

Perplexed look and deep frown ;-)

Thanks in Advance
Frans




view thread (2+ messages)  latest in thread

Message-ID: <000101be7bb8$93709360$0101a8c0@carolina>
Permalink:  ../000101be7bb8$93709360$0101a8c0@carolina/
Also on:    postgresql.org/message-id/000101be7bb8$93709360$0101a8c0@carolina

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: Frans@Playful.com
  Subject: Re: Retrieving the record not matched with a join.
  In-Reply-To: <000101be7bb8$93709360$0101a8c0@carolina>
  References: <19990331171611.B12083@kfs.org> <000101be7bb8$93709360$0101a8c0@carolina>

* 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