Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Random Numbers
Derek,
The only one I have seen is in Scott Urman's book, "Oracle PL/SQL Programming" from Oracle Press. On pp. 241-243 he has a package which uses the same algorithm as C's rand() function.
Oracle's vast website may have some place where you can download the package. Its name is "random".
Ken
Derek Fielder wrote:
>
> Does anyone know of a way of generating random or semi-random numbers in
> PL/SQL?
>
> I have a client who has two requirements
> 1. They would like to select random records from a table.
> 2. They would like to select records based on randomly selected dates
> within a range.
>
> The first requirement can probably be met by sorting on some strange
> combination of fields but the second one seems to require a random
> number generator.
>
> Any ideas?
>
> dfielder_at_usa.net
Received on Fri Sep 19 1997 - 00:00:00 CDT
![]() |
![]() |