Page 1 of 1

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

Posted: Fri Jun 08, 2007 8:08 am
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)

Posted: Fri Jun 08, 2007 8:16 am
by DSguru2B
Stick in a semicolon at the end of the command. Also try with call instead of exec.

Posted: Fri Jun 08, 2007 8:23 am
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.