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

Home -> Community -> Usenet -> c.d.o.misc -> Re: dbms_random&varray

Re: dbms_random&varray

From: Ora_PL <ploug_at_onet.eu>
Date: Sun, 15 Apr 2007 16:36:04 +0200
Message-ID: <evtd88$ts3$1@news.onet.pl>


Of course thanks for Michel's answer too. Both methods working now without any problems.

But I don't know why this version
made this error ORA-06533 previously.
Anyway big THX for all.

DECLARE
V_IN NUMBER(2);
TYPE table_v IS VARRAY(3) OF NUMBER; V_TABLE TABLE_v;

BEGIN
v_in := dbms_random.VALUE(1,3);
v_table := TABLE_v(V_IN);

for idx in v_table.first..v_table.last loop DBMS_OUTPUT.PUT_LINE(TO_CHAR(v_Table(idx))); end loop;

END;
/ Received on Sun Apr 15 2007 - 09:36:04 CDT

Original text of this message

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