Open command at oracle stage

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
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Open command at oracle stage

Post by vinsashi »

Hi,
I created stored procedure in oracle database.

create or replace procedure sp_TruncateLandingTable
( itable_name varchar2 ) as
l_table varchar2(255);
begin
l_table := 'truncate table ' || itable_name;
dbms_utility.exec_ddl_statement(l_table);
end sp_TruncateLandingTable;


and in oracle stage open command option i am calling like this

EXECUTE sp_TruncateLandingTable RFRT_CAD_FXTR_DATA,0

but job getting aborted invalid command like that it saying.
and i have tried like this also
exec ssp_TruncateLandingTable RFRT_CAD_FXTR_DATA

Please help on this


Thanks
v.........
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Re: Open command at oracle stage

Post by BI-RMA »

Hi vinsashi,

Correct syntax for execution of a stored procedure in Oracle is
CALL procedure_name(parameter_1,...)

So DataStage is right to tell You that exec or EXECUTE is an invalid command.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

Thanks a lot its working with CALL statement.
Post Reply