catch excpetion in execute immediate
597998Mar 19 2010 — edited Mar 19 2010i would like to run some select statement and if identiefier not exist i would like to write error but exception is never executed even if identifier does not exist. This is my code:
begin
execute immediate 'select '||objekt_2.kolona||' from '||objekt_1.ime_tabele;
DBMS_OUTPUT.PUT_LINE('test :select '||objekt_2.kolona||' from '||objekt_1.ime_tabele);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('error');
flag := 1;
end;