I’m trying to export a file with a variable name by using the user defined variables in options. When I try to define my variable as select to_char(sysdate,‘mmm yyyy’) from dual it puts that statement in the file name rather than the result of the statement. how do I format this in the variable so that it recognizes it as a formula rather than text?
I put the solution on mine blog page:
http://damir-vadas.blogspot.co.at/2016/10/toads-automation-designer-and-sqlplus.html
@Toad tech guys…
Toad 12.10.0.30 x64 version tested
Could you checked why user variable (if is previously defined in Toad) prevent initialization from outside (but only from Toad app)?
I thin this is not Ok behavior and Toad should not control it.
Brg
Damir
Right-click in the filename edit box of the export dataset dialog. Choose “Variables”, and then DATEFILE, and click OK.
That will put %DATEFILE% in the edit box. Then add a path, so it looks like C:%DATEFILE%.txt or whatever you want. It’s not as customizable as TO_CHAR() but hopefully that will be close enough.