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

Home -> Community -> Usenet -> c.d.o.tools -> Re: how can i find the result?

Re: how can i find the result?

From: Doug O'Leary <dkoleary_at_mediaone.net>
Date: Fri, 15 Jun 2001 19:00:56 GMT
Message-ID: <MPG.159418775abcbd0f98979f@news.randori.com>

[This followup was posted to comp.databases.oracle.misc and a copy was sent to the cited author.]

Got it! The original post had a fatal logic flaw that I saw only after taking another look at it. The key is that you have two sets of numbers - the first with all numbers between 1 and the max of your table - the second set is all the values of no. The difference is how you find the answer to your query thusly:

  1 select rownum
  2 from all_objects
  3 where rownum <=
  4 ( select max(no)
  5 from find_number
  6 )
  7 minus
  8 select no
  9* from find_number
SQL> /     ROWNUM


         4
         6

HTH; Doug

-- 
-------------------
Douglas K. O'Leary
Senior System Administrator
dkoleary_at_mediaone.net
Received on Fri Jun 15 2001 - 14:00:56 CDT

Original text of this message

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