ORA-06502 [message #42494] |
Wed, 02 April 2003 14:28 |
Nan
Messages: 12 Registered: August 2000
|
Junior Member |
|
|
Questn: Does anyone know what this error message means
Ora-06502 : pl/sql: numeric or value error: NULL index table key value.
I understand the numeric or value error, but I don't understand the NULL index table key value.
I get this error when I run my procedure that's importing information from a spreadsheet (.csv) into a pl/sql table.
Any advice will help
|
|
|
Re: ORA-06502 [message #42495 is a reply to message #42494] |
Wed, 02 April 2003 16:19 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Nan, your index variable is either not getting initialized or is accidentally getting set to NULL somewhere in the code:
sql>declare
2 type t is table of number index by binary_integer;
3 v_t t;
4 i pls_integer;
5 begin
6 i := 1;
7 v_t(i) := 1; -- fine because i has a value
8 i := null; -- i accidentally set to null
9 v_t(i) := 2; -- error
10 end;
11 /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: NULL index table key value
ORA-06512: at line 9
|
|
|
|