SQL>
SQL> DECLARE
2 TYPE months_varray IS VARRAY(12) OF STRING(9 CHAR);
3
4 TYPE calendar_table IS TABLE OF VARCHAR2(9 CHAR) INDEX BY BINARY_INTEGER;
5
6 month MONTHS_VARRAY := months_varray('January','February','March','April','May','June','July','August','September','October','November','December');
7
8 calendar CALENDAR_TABLE;
9 BEGIN
10 IF calendar.COUNT = 0 THEN
11 FOR i IN calendar.FIRST..calendar.LAST LOOP
12 DBMS_OUTPUT.PUT_LINE('Index ['||i||'] is ['||calendar(i)||']');
13 END LOOP;
14 END IF;
15 END;
16 /
DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 11
SQL>
|