Datestage will issue a warning message saying 'zero rows updated' if I use an ODBC stage to do updates and the key being updated doesn't exist in the table.
I expected this same behavior when doing deletes. I used an ODBC stage and changed the SQL to user defined so that I could issue a delete statement. When I run the job Datastage does not issue the warning message if the statement deletes zero rows. Is there any way to change this so that deleting nothing isn't treated as a success?
Deleting nothing in an ODBC stage
Moderators: chulett, rschirm, roy
Hi,
I'm not aware of a way to do it,
but in any case if you want to know are there any rows to be deleted you could perform a select count with the same where part you use in the delete statement.
I guess since you intend to delete the rows anyway there is nothing wrong with them not being there in the first place, the same can not be said when you issue an update statement.
IHTH,
I'm not aware of a way to do it,
but in any case if you want to know are there any rows to be deleted you could perform a select count with the same where part you use in the delete statement.
I guess since you intend to delete the rows anyway there is nothing wrong with them not being there in the first place, the same can not be said when you issue an update statement.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)