Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: random in PL/SQL
Jan, you may also neeed to run utlraw.sql and privtrawb.plb (from the same
directory) if package SYS.UTL_RAW isn't already installed.
Paul
"Thomas Kyte" <tkyte_at_us.oracle.com> wrote in message
news:9vgfkl0vhi_at_drn.newsguy.com...
> In article <vv8n1uk2grj3fg7u7lcudkmlu2vu2kka92_at_4ax.com>, Sybrand says...
> >
> >On Sat, 15 Dec 2001 19:56:50 +0100, Jan Eliasen <eliasen_at_cs.auc.dk>
> >wrote:
> >
> >>Hi there.
> >>
> >>I can't find a random function in PL/SQL - can that be true? I've
searched
> >>through all the documentation I could find.
> >>
> >>So what do I do if I want a random number between 18 and 100?
> >
> >
> >Use the dbms_random package when running 8.1.5 and higher, and use
>
> 803 or higher -- just run $ORACLE_HOME/rdbms/admin/catoctk.sql if its not
> installed...
>
> in 73 and before, you can see
> http://osi.oracle.com/~tkyte/Misc/Random.html
>
> for a random package that works just like the C rand() function.
>
>
> >http://tahiti.oracle.com as a search engine for the doco.
> >
> >Hth
> >
> >Sybrand Bakker, Senior Oracle DBA
> >
> >To reply remove -verwijderdit from my e-mail address
>
> --
> Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
Received on Tue Dec 18 2001 - 15:05:09 CST