Re: Random Number Generator SEED

From: Thomas J Kyte <tkyte_at_us.oracle.com>
Date: 1995/08/29
Message-ID: <41vrvi$817_at_inet-nntp-gw-1.us.oracle.com>#1/1


godbouts_at_gov.nb.ca (Stephane C. Godbout) wrote:

>Good Day !!
 

>After having determined that Oracle does not have a random number generator, I programed one.
>The generator (after being given a seed) will provide a number between 0 and 1.
 

>The seed has to be between 1 and 2,147,483,647. I was thinking of using the milliseconds stamp
>off of the computer however, It seems that Oracle doesn't have a function to do this.
 

>Has anyone figure out a way around this issue.
 

>If you have, please let me know at the EMAIL address below
 

>Thanks in advance for all your help
 

>Stephane C. Godbout
>godbout_at_gov.nb.ca

Look at the dbms_utility package (if not installed you will find it in $ORACLE_HOME/rdbms/admin/dbmsutil.sql).

There is an entry in there "get_time".

It will give you what you want. You will need to abs() this function (absolute value) cause the numbers will go negative (simply an integer that is wrapping around).

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government Received on Tue Aug 29 1995 - 00:00:00 CEST

Original text of this message