Re: array(Urgent) [message #75926] |
Wed, 13 March 2002 01:21 |
roberto
Messages: 10 Registered: February 2002
|
Junior Member |
|
|
This is my problem;help me if you can!!
SQL> r
1 declare
2 type vartyp is varray(100) of cols.column_name%type;
3 var1 vartyp;
4 begin
/*I want to initialize dinamically a varray*/
5 SELECT column_name INTO var1
6 from cols
7 WHERE table_name='EMP';
8 FOR I IN var1.FIRST..VAR1.LAST LOOP
9 DBMS_OUTPUT.PUT_LINE(VAR1(I));
10 END LOOP;
11* END;
declare
*
ERROR at line 1:
ORA-06550: line 5, column 29:
PLS-00385: type mismatch found at 'VAR1' in SELECT...INTO statement
ORA-06550: line 5, column 5:
PL/SQL: SQL Statement ignored
|
|
|