I'm trying to create an object in pl/sql using sql developer. I'm just messing around with the basics to get a hang of it. I keep getting a error
Invalid reference to variable 'I'
SET serveroutput ON
create or replace type conditions as object
(var_name varcher (100) ,
extract_method varchar(100),
default_value varchar (100),
idList varchar (100));
DECLARE
condition conditions;
TYPE namesarray IS VARRAY(1) OF conditions;
names namesarray := namesarray();--figure out why this is.
BEGIN
condition := conditions('a', 'b', 'c', 'd');
names.extend;
names(names.last):= condition;
FOR i IN names.FIRST .. names.LAST
LOOP
DBMS_OUTPUT.PUT_line(i.idList);
END LOOP;
end;
how can i get this to work?