You could use an "Actionable query" action for the if.... part. Actionable queries are on the DB Misc tab in the automation designer. The actionable query returns true/false based on query result. The idea is to fill in the WHERE clause of "Select 'TRUE' from dual where (.....)" to return true or not. So, with your examples: Table Exists: select 'TRUE' from dual where ((select 1 from dba_tables where owner = 'SCHEMA' and table_name = 'TABLE_NAME') = 1) Rows returned from query > 0 select 'TRUE' from dual where ((select count(*) from emp) > 0); If you want to put query results into a variable, you might look at Query Iterator. That's it's not limited to single row or single column, but it would work to put a query result into a variable. I wrote a blog about Query Iterator here: http://www.toadworld.com/products/toad-for-oracle/b/weblog/archive/2016/10/20/new-in-toad-39-s-automation-designer-query-iterator I hope it helps. -John
↧