pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Mark Mitchell <mark@lapcrew.com>
To: pgsql-sql@postgresql.org
Subject: Re: EXCEPT Queries
Date: Wed, 19 Feb 2003 22:45:15 -0800
Message-ID: <200302192245.15808.josh@agliodbs.com> (raw)
In-Reply-To: <3E53D806.5030501@lapcrew.com>
References: <3E53D806.5030501@lapcrew.com>

Mark,

> SELECT
> "A"."SUBSCRIBER_NAME" , "A"."ACCOUNT_NUMBER"
> FROM "A"
> WHERE
> "A"."ACCOUNT_NUMBER"
> NOT IN
> (
>   SELECT
>   "B"."ACCOUNT_NUMBER"
>   FROM "B"
> )

Use "WHERE NOT EXISTS" instead.   See the documentation on SELECT for how to 
write this clause.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (4+ messages)  latest in thread

Message-ID: <200302192245.15808.josh@agliodbs.com>
Permalink:  ../200302192245.15808.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200302192245.15808.josh@agliodbs.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: josh@agliodbs.com, mark@lapcrew.com
  Subject: Re: EXCEPT Queries
  In-Reply-To: <200302192245.15808.josh@agliodbs.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