Read data via Oracle Connector using PL/SQL

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hishamzz
Participant
Posts: 12
Joined: Tue Feb 12, 2008 3:08 am

Read data via Oracle Connector using PL/SQL

Post by hishamzz »

Hi Folks,

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;

I have defined the SECTOR_ID column in the Oracle Connector stage but the output is coming as NULL. As in, nothing is being mapped.

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
Post Reply