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: Selecting Next X Values From Dual

Re: Selecting Next X Values From Dual

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Thu, 26 Sep 2002 15:18:19 -0800
Message-ID: <F001.004DAA21.20020926151819@fatcity.com>


Gary Chambers wrote:
>
> All...
>
> Is there a method by which I can select the next x values from a
> sequence from dual? I've searched Google and OraFAQs.com, but I can't
> seem to make any hits on my search request. TIA
>
> Gary Chambers
>
> //-------------------------------------
> // Lucent Technologies GIO/Unix
> // 4 Robbins Road, Westford, MA 01886
> // 978-399-0481 / 888-480-6924 (Pager)
> // Nothing fancy and nothing Microsoft
> //-------------------------------------
>

Gary,

    You do not have to use dual.    

    select myseq.nexval
    from dictionary
    where rownum < x + 1

can return the x next values for a fairly high value of x.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.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).
Received on Thu Sep 26 2002 - 18:18:19 CDT

Original text of this message

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