I'm trying to do the following using PL/SQL:
- Use a query to get a list of strings
- Use a for loop to query using the list as an input.
I have this so far:
DECLARE
sub2 varchar2(12);
cursor sub is Select ID_SUBLIN from TABLE 1 group by ID_SUBLIN;
BEGIN
for sub2 in sub LOOP
for inner in (select * from TABLE2 where PARAMETER=sub2.ID_SUBLIN )
loop
DBMS_OUTPUT.PUT_LINE( sub2 );
end loop;
end loop;
END;
/
However it doesn't work. I'm only iterating over a 11 items list
Thanks in advance