User Defined Variables in Options

Follow / 6 Oct 2016 at 5:40pm

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?


  • Follow / 11 Oct 2016 at 3:39pm

    I put the solution on mine blog page:

    @Toad tech guys...
    Toad 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.


  • Follow / 11 Oct 2016 at 9:33pm

    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.