I am trying to execute a SQL via a PL/SQL block using the Oracle Connector stage. Example as follows :-
Code: Select all
declare
sql_stmt varchar2(4000);
begin
sql_stmt := 'SELECT SECTOR_ID FROM SECTOR_DIM';
execute immediate sql_stmt;
end;
To give context into why I am trying the above. The idea is perform a sparse lookup and replacing the SELECT statement above with a select statement coming from an input column.
Would appreciate if anyone would help tinker the above PL/SQL so that i would be able to get the required output.
Regards,
Hisham