Toad Automation Designer - Set Variable action - cannot use expression

Hi all,

In a Set Variable action, I cannot seem to use an expression as ‘value’. In Toad for Data Analysts, you can use e.g.
SELECT TO_CHAR(SYSDATE-1,‘DDMMYY’) FROM DUAL
and get the result of the expression into the value in a Set_Variable activity.

However, if you do that in Toad Automation Designer, the value becomes the select statement as a string. Reducing it just to the TO_CHAR() bit has a similar effect. I can’t get the result from the expression into the variable value. I can use a single system variable (e.g. %SYSDATE%), but other expressions don’t seem to work. Any thoughts?

I am having this same issue. Is this resolved somewhere?

These variables are not tied to a connection, but we do have several system variables that you can use (which don’t have to be set). One of them is DATETIME, which corresponds to the time on your PC. Go to Options -> Variables to see the rest.

If those don’t serve your needs, let us know what you are trying to accomplish and we’ll try to help.

Oh! You could use a Query Iterator action to set a variable from a database value.

I wrote a blog about here: http://www.toadworld.com/products/toad-for-oracle/b/weblog/archive/2016/10/20/new-in-toad-39-s-automation-designer-query-iterator