Multi Instance Job - DsJobInvocationId
Posted: Mon Feb 18, 2013 4:55 pm
Hi All,
We have a scenario where we update the same audit table and column across multiple processes for different values in where clause, once when a Sequence job starts and finally as the last step when the Seq job ends.
The only change in the update query across different seq jobs is the value in the where clause changes based on the process
e.g.
Update TableName Set ColName1 = sysdate where Colname2 = 'XYZ'
Update TableName Set ColName1 = sysdate where Colname2 = 'ABC'
We are trying to pass the value 'XYZ' as the InvocationID and use it this way in the SQL statement
Update TableName Set ColName1 = sysdate where Colname2 = #DsJobInvocationId#
But this does not work..Can we or Can we not use the InvocationID this way in the where clause
(I believe it works if we use the InvocationId for the tablename in this query)
We have a scenario where we update the same audit table and column across multiple processes for different values in where clause, once when a Sequence job starts and finally as the last step when the Seq job ends.
The only change in the update query across different seq jobs is the value in the where clause changes based on the process
e.g.
Update TableName Set ColName1 = sysdate where Colname2 = 'XYZ'
Update TableName Set ColName1 = sysdate where Colname2 = 'ABC'
We are trying to pass the value 'XYZ' as the InvocationID and use it this way in the SQL statement
Update TableName Set ColName1 = sysdate where Colname2 = #DsJobInvocationId#
But this does not work..Can we or Can we not use the InvocationID this way in the where clause
(I believe it works if we use the InvocationId for the tablename in this query)