How to call a DBMS routine in a after sql statement?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rverharen
Premium Member
Premium Member
Posts: 34
Joined: Fri Jan 19, 2007 9:09 am
Location: Breda, The Netherlands

How to call a DBMS routine in a after sql statement?

Post by rverharen »

I want to use the statement:

exec dbms_mview.refresh('testroy_mview', 'F')

in my after sql statement of an oracle stage (or in a new stage after the oracle stage).
The error i get is that my sql statement is invalid although i can run the statement in sql.

what's the easiest way to execute such a statement from datastage?

(because of the version of datastage at this customer i don't have the stored procedure stage :(, so that's no option)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Stick in a semicolon at the end of the command. Also try with call instead of exec.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rverharen
Premium Member
Premium Member
Posts: 34
Joined: Fri Jan 19, 2007 9:09 am
Location: Breda, The Netherlands

Post by rverharen »

DSguru2B wrote:Stick in a semicolon at the end of the command. Also try with call instead of exec.
With the call-statement it works now (the semicolon isn't nessacary).
Thanks for the quick response.
Post Reply