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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL help needed

Re: SQL help needed

From: Mladen Gogala <mgogala_at_adelphia.net>
Date: Tue, 16 Sep 2003 19:44:36 -0800
Message-ID: <F001.005D0152.20030916194436@fatcity.com>


There is no way you can do it without some procedural programming. 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: kirtikumar_deshpande_at_yahoo.com
>
> 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: ListGuru_at_fatcity.com (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: mgogala_at_adelphia.net

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: ListGuru_at_fatcity.com (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).
Received on Tue Sep 16 2003 - 22:44:36 CDT

Original text of this message

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