Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: MINUS problem

Re: MINUS problem

From: Phil R Lawrence <prl2_at_lehigh.edu>
Date: 1998/03/13
Message-ID: <6ebget$1lpm@fidoii.cc.Lehigh.EDU>#1/1

Thanks for the hint about null, but the suggested SQL answers a differnt question than the one I seek to ask.

Perhaps the issue can be boiled down to this:

How may I use MINUS between two SELECTs that return a different number of columns? I thought I could add a NULL in place of the missing column, so:


  1 (select distinct

  2         gurmail_pidm,
  3         gurmail_term_code,
  4         gurmail_letr_code,
  5         gurmail_date_printed

  6 from general.gurmail
  7 where gurmail_date_printed is null)   8 MINUS
  9 (select distinct
10         gurmail_pidm,
11         NULL,
12         gurmail_letr_code,
13         gurmail_date_printed

14 from general.gurmail
15 where gurmail_date_printed is null)

How should I make up for the missing column if not by NULL?

Thanks,
Phil Received on Fri Mar 13 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US