Thread: Re: [SQL] locked my keys in the car

Re: [SQL] locked my keys in the car

From
"Phil R Lawrence"
Date:
>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.