I'm trying to do a pl/sql with two loops. Inside second loop it gives me error:
ORA-00942.
I do the query manually and I don't have any error. Someone could help me please?
Thanks
begin
DBMS_OUTPUT.PUT_line('begin' );
for i in ( select table_name from user_tables where table_name like 'A%002_AJOB') loop
dbms_output.put_line(i.table_name);
DBMS_OUTPUT.PUT_LINE('La tabla es ... ' || i.table_name );
for j in ( select job from i.table_name where status='Wait' ) loop
dbms_output.put_line('Job is....' || j.job);
end loop;
end loop;
end;
/