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: Is there any RANDOM functions in PL/SQL?

Re: Is there any RANDOM functions in PL/SQL?

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 9 Jan 2000 15:42:32 GMT
Message-ID: <85aa98$1kc$2@news.seed.net.tw>

Weidong Zhou <weidong.zhou_at_sabre.com> wrote in message news:38767482.761F244E_at_sabre.com...
> Daniel,
> I found something about random number on Internet. Oracle has DBMS_RANDOM
> package that can generate random number. I also found a simple sample code
> as follows:
>
> DECLARE
> i BINARY_INTEGER;
> BEGIN
> dbms_random.initialize(19254);
> i := dbms_random.random;
> INSERT INTO some_table VALUES(i);
> dbms_random.terminate;
> END;
>
> The problem is when I run the the code, I got some errors like
> ORA-06550: line 4, column 5:
> PLS-00201: identifier 'DBMS_RANDOM.INITIALIZE' must be declared
>
> I am not a DBA, so I wonder how do I run DBMS_RANDOM package? Anyone has
> ideas? Thanks.

DBMS_RANDOM package is not created in a default installation. You may ask your DBA to create it and grant the execution privilege to you. Received on Sun Jan 09 2000 - 09:42:32 CST

Original text of this message

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