Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Random Number Function
Frank,
Oracle does have a random function, you need to install the following from your /admin/ script directory.
The following packages need to be installed.
dbmsoctk.sql - Cryptp package spec
dbmsrand.sql - Random number package
pvtoctk.plb - Crypto package wrapped
I would read the package spec for DBMS_RANDOM for further information.
Hope this helps
Chris.
Frank Siegel wrote:
>
> I have a table with 300K rows with each row numbered
> 1 to 300,000 (not an Oracle sequence object). Let's
> call this column PAT_NUM. It is my understanding
> that Oracle does not have a RANDOM function.
>
> Do you know of a random algorithm I can use to select
> random rows based on the the coulmn PAT_NUM?
>
> I have the user of a cursor within a stored procedure
> if it would help. Or I can use PL/SQL programming
> constructs within a stored procedure is that helps.
>
> Please shed some light! Thanks!
> Frank S., New Hampshire
Received on Tue Jan 26 1999 - 13:59:29 CST