I have a very large automation process that has a bunch of Export to Excel processes and other SQL file executions that run that relies on data gotten from an initial SQL process that loads a table before the first Export to Excel task runs. But what I would like to do is, set a variable based on the number rows loaded to that table right before my first Export to Excel process runs and if it equals 0, then essentially abort the entire Toad automation without actually throwing an error. Reason being is, all my other "Execute Script" tasks for other SQL processes and the other Export to Excel processes, all rely on data in this initial table. So if this table has NO rows, I'd like to "abort" the process which would speed this entire process up a lot.
But the only task I can find that would do something like this is the "Throw Error" System Activity. Is there any other task or way of having the Toad Automation essentially "exit out" or "abort" without throwing an error?
How about using the "If Condition" task, under the System Activities category?
You can execute your driver script, and then test the row count for zero.
If no rows found, then maybe you log a comment or send an email to note the status and that's it. Else, if rows found, then proceed with your sequence of export steps, etc.
See example snap below, where zero rows found simply logs a comment, but the rows found branch continues with my scripts and exports, etc.
Hi Gary, thank you for that suggestion, however, I have already tried something like that, but in this case, that other part of the IF condition, would have well over 40 other steps in that area, and it would become very unruly to view it on the screen, as you are aware Toad is not that great with putting stuff in those Groups and making it look pretty. Plus, if you weren't aware, if I was to drag all of my objects and try to put in that other IF condition, it loses all the names/descriptions I created and reverts back to a default generic name.
That is why I just would like a simple abort process that I could put after the count = 0.