DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 27

Thread: Missing Numbers (Between two numbers)

Threaded View

  1. #7
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by jmodic
    SELECT :v_lower + ROWNUM AS missing_number
    FROM ALL_OBJECTS
    WHERE ROWNUM < :v_upper - :v_lower;
    Jurij :

    I dont understand if this will fit what poster has asked for ..

    How about

    Code:
    Select Column_Name + 1 From My_Table Where Column_Name + 1 <= My_Max_Value And Column_Name + 1 >= My_Min_Value
    Minus
    Select Column_Name From My_Table Where Column_Name <= My_Max_Value And Column_Name >= My_Min_Value
    Last edited by abhaysk; 04-08-2004 at 07:41 AM.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width