I need to make a collection in a Package, but I don't know where was the mistake...
This is my declaration and initialization:
avversao varchar2(30);
TYPE tListaVersaoHomologada IS TABLE OF NVARCHAR2(30);
vVersaoHomologada tListaVersaoHomologada := tListaVersaoHomologada('0.06', '0.07');
And this is where raise the exception
if NOT(vVersaoHomologada.EXISTS(avversao)) then
...
end if;
The variable
avversao
Have one of the values:
Reference:
member of
- checking if value exists in collection.
EXISTS
- Is for check if collection has value in index.
declare
avversao varchar2(30) := '0.06';
TYPE tListaVersaoHomologada IS TABLE OF VARCHAR2(30);
vVersaoHomologada tListaVersaoHomologada := tListaVersaoHomologada('0.06', '0.07');
begin
if avversao member of vVersaoHomologada then
dbms_output.put_line('!!!!Exist!!!!!');
end if;
end;