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

Home -> Community -> Usenet -> c.d.o.server -> Re: generate random numbers

Re: generate random numbers

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Tue, 3 May 2005 04:24:16 -0700
Message-ID: <j86dnR36GMitwurfRVn-1w@comcast.com>

"Vince .>" <vincent@<remove> wrote in message news:0vje71pueo53r2dmd30fr46iv35u7d474l_at_4ax.com...
> hi there !
>
> I would like to use random numbers in my pl/sql code..
> do I really need to user dbms_random package or there is another to do
> so ?
> if so, how could I use dbms_random to generate positive random
> numbers??
>
> thanks a lot..
> Vince

I would use the package. It generates numbers between 0 and 1 so just multiply the result by the number you want. (eg 0 to 6 multiply by 6) You could write your own. (why?) Most people use a linear congruency generator method. (google is your friend)
Jim Received on Tue May 03 2005 - 06:24:16 CDT

Original text of this message

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