-1

I need to create a varray, and its size must be a parameter of the procedure, for example

create or replace procedure x (cant number)
as
type arreglo is varray(cant) of number;
elarreglo arreglo :=arreglo();
begin
        elarreglo(1):=(9);
        ....
        ....
end;

I try to do this, but it shows this error:

LINE/COL ERROR
-------- -----------------------------------------------------------------
3/24     PLS-00103: Encountered the symbol "CANT" when expecting one of
         the following:
         <a number>
         The symbol "<a number> was inserted before "CANT" to continue.

what I'm doing wrong? Is possible to do what I'm trying?

1

It can not be a variable, it must be a literal.

Collection Variable Declaration

enter image description here

size_limit

Maximum number of elements that the varray can have. size_limit must be an integer literal in the range from 1 through 2147483647.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.