pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Phil R Lawrence <prl2@lehigh.edu>
To: ugd@geeky1.ebtech.net
To: pgsql-sql@postgreSQL.org
Cc: UserGuideDog <ugd@geeky1.ebtech.net>
Subject: Re: [SQL] locked my keys in the car
Date: Mon, 3 Aug 1998 13:43:24 -0400
Message-ID: <009401bdbf06$37fd5460$3e03b480@dummy.res.lehigh.edu> (raw)

>So my next question is:  
>Is there a way, using SQL, to do the math on this, i.e., to rm the
>patients who appear twice - once in the first query, once in the second?
>(God forbid we re-admit the same patient at some future date!)


Try MINUS.

SQL1
    MINUS
SQL2

yields SQL1's results minus any also found in SQL2.




view thread (9+ messages)  latest in thread

Message-ID: <009401bdbf06$37fd5460$3e03b480@dummy.res.lehigh.edu>
Permalink:  ../009401bdbf06$37fd5460$3e03b480@dummy.res.lehigh.edu/
Also on:    postgresql.org/message-id/009401bdbf06$37fd5460$3e03b480@dummy.res.lehigh.edu

 · 

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: prl2@lehigh.edu, ugd@geeky1.ebtech.net
  Subject: Re: [SQL] locked my keys in the car
  In-Reply-To: <009401bdbf06$37fd5460$3e03b480@dummy.res.lehigh.edu>
  References: <009401bdbf06$37fd5460$3e03b480@dummy.res.lehigh.edu>

* 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