Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: how can i find the result?
[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.netReceived on Fri Jun 15 2001 - 14:00:56 CDT