PL/SQL is easy and, knowing you and your great knowledge , I'm not
going to offer that kind of advice. SQL was modelled on the set theory,
which essentially means that you are selecting subset, based on relatively static criteria which can be defined with certain set of fixed conditions.
I don't think that your condition falls into that category. If there
is a purist SQL solution, which I doubt, then your only chance lies in
the analytical functions. Off hand, I don't know anything specific and
I'm too tired to start digging. Good luck. If anybody can find a solution,
you can.
On 2003.09.16 23:29, Kirtikumar Deshpande wrote:
Hello Listers,
I need some SQL help. Not sure if this is possible in plain SQL or not, but here it is: I have a table with two columns: EMPNBR LINENBR ------ ------- 100 1 200 4 300 8 400 9 500 14
How would I find out the missing linenbrs (2,3,5,6,7) if I was given minlinenbr as 1 and maxlinenbr as 10 that would be passed as variables (using &).
Thanks.
- Kirti
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Kirtikumar Deshpande INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
-- Mladen Gogala Oracle DBA -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mladen Gogala INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
