declear
type function_array is varray(4) of varchar2(10);
function_id function_array;
begin
SELECT 'AAB'||TO_CHAR(SubStr(Max(ID),6,3)+1) BLUK COLLECT INTO function_id FROM GSC_functions WHERE ID LIKE 'AAB%' ORDER BY ID DESC;
SELECT 'AAB'||TO_CHAR(SubStr(Max(ID),6,3)+2) BLUK COLLECT INTO function_id FROM GSC_functions WHERE ID LIKE 'AAB%' ORDER BY ID DESC;
for i in 1..function_id.count loop
dbms_output.put_line('function_id.count'|| function_id.count ||'FUNCTION:'||function_id(i));
end loop;
end;
/
i expect the function.count should be 2. but i don't know why it return 1.
how can i select into function_id(1) and function_id(2) to array of function_id?
or how to create two dimension array and then select into array.