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: Fri, 27 Sep 2002 14:34:15 -0800
Message-ID: <F001.004DBC8A.20020927143415@fatcity.com>


Gary Chambers wrote:
>
> > I created a package that would easily loop thru and select x number of
> > entries, but not return them in a select to you. This way, you can
> > make 1 simple call passing it X. Is that what you wanted ??? Or do you
> > have to have them as returned values of a select ?
>
> I would need the values returned through select, if I'm correctly
> understanding you (it's a web-based application). I thought of doing
> something like:
>
> SELECT sequence.nextval FROM table WHERE ROWNUM < x
>
> It just seems too kludgy, and I didn't think creating a table with dummy
> data for the count would be a good way to go. Any suggestions?
>

Why 'too kludgy' ? If you are inside a PL/SQL package have you though of a bulk collect into an array of numbers?

-- 
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 Fri Sep 27 2002 - 17:34:15 CDT

Original text of this message

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