pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: SQL Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: How to find entries missing in 2nd table?
Date: Tue, 11 Jul 2006 10:03:39 -0700 (PDT)
Message-ID: <20060711170339.65498.qmail@web31809.mail.mud.yahoo.com> (raw)



--- Richard Broersma Jr <rabroersma@yahoo.com> wrote:

> > >> I need to get all entries from the table control that are not listed in
> > >> datapack.
> > > 
> > > SELECT C.CONTROLLER_ID
> > > 
> > > FROM CONTROL AS C 
> > >   LEFT JOIN DATAPACK AS D ON ( C.CONTROLLER_ID = D.CONTROLLER_ID)
> > > 
> > > WHERE D.CONTROLLER_ID IS NULL;
> > > 
> > 
> > 
> > Or
> > (SELECT controller_id FROM control)
> > EXCEPT
> 
> Good point!  But don't forget to include the list. :-)
> 
> Regards,
> 
> Richard Broersma Jr.
> > (SELECT controller_id FROM datapack)
> > ?
> > 
> > -- 
> > Milen A. Radev
> > 
> 
> 




view thread (13+ messages)  latest in thread

Message-ID: <20060711170339.65498.qmail@web31809.mail.mud.yahoo.com>
Permalink:  ../20060711170339.65498.qmail@web31809.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060711170339.65498.qmail@web31809.mail.mud.yahoo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rabroersma@yahoo.com
  Subject: Re: How to find entries missing in 2nd table?
  In-Reply-To: <20060711170339.65498.qmail@web31809.mail.mud.yahoo.com>

* 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