I would like to test function that return Nested table sql datatype:
CREATE TYPE “TYP_CLCN” AS TABLE OF Varchar2(10)
AS an outcome I would like to comapre return value (nested table) with Query.
When I run a test I have got an error:
ORA-06533: Subscript beyond count
I have checked the code generated and found out that variable declared as :
l_exp_collection “TYP_CLCN” := TYP_CLCN();
but work with it like with pl/sql associative arrays without EXTENDING it:
OPEN l_cursor FOR ‘SELECT ‘‘a’’ FROM DUAL’;
FETCH l_cursor INTO l_exp_collection (l_exp_collection.COUNT + 1);
EXIT WHEN l_cursor%NOTFOUND;
What am I doing wrong?