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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Random select one row from a cursor?

Re: Random select one row from a cursor?

From: Gazza <garywaldrom_at_hotmail.com>
Date: Wed, 17 Nov 1999 13:15:14 -0000
Message-ID: <942844583.11509.0.nnrp-07.c1ed75d0@news.demon.co.uk>


You could use the DBMS_RANDOM.RANDOM function to generate a binary integer random number and use this to select a particular rowcount in your cursor

--
Gary Waldrom
Amonra Insight - Makers of Q-file IT Reference Guides http://www.q-file.com

<yliu_at_creighton.edu> wrote in message
news:Pine.HPP.3.95.991116094623.17392A-100000_at_penguin.creighton.edu...
> Hi,
>
> I was wondering if someone can help me with the following problem: in my
> pl/sql program, I have a cursor which contains some number of rows, how
> can I random select one row from that cursor?
>
> Any help will be appreciated.
>
> Best regards,
>
> Yongge
> yliu_at_creighton.edu
>
Received on Wed Nov 17 1999 - 07:15:14 CST

Original text of this message

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