chain rule using sql syntax to query oracle table
say I have a chain job which needs to do the following:
1) execute sql query to determine number of rows in a given oracle table;
2) if rows = 0 then no datasets to create and terminate entire job chain
3) if rows > 0 then start chain to create datasets
4) once datasets chain completed then email datasets to client
5) once email to datasets completed then end chain
I finally found a reference that appears to address this issue at http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse009.htm#CHDDEEIF
here is what was given at this site:
****************************************************************************
A step needs to wait for data to arrive in a table from some other process
that is external to the chain. You could condition this step on both the
completion of another step and on a particular table containing rows.
The Scheduler would then have to evaluate rules every so often to determine
when this condition becomes TRUE. The condition would use SQL WHERE clause
syntax, and would be similar to the following:
':step1.state=''SUCCEEDED'' AND select count(*) from oe.sync_table > 0'
****************************************************************************
well I tried this syntax and a couple of other variations and every time I tried to save the chain rule with this syntax I got error messages indicating an invalid "relational operator" or a "missing expression" in the syntax.
can anybody provide/point me to examples of this kind of thing that will work ?? I have an SR with oracle and it sounds like they are wanting to say that this type of thing cannot be done .... which would be pretty amazing that it couldnt be .....
thank you