2 Replies Latest reply: Apr 9, 2014 5:01 AM by samdaga RSS

    SQL Developer replace system date into a string

    samdaga

      Hi,

      I have a script which exports the result of a query to a file in a folder whose name includes the current system date. I tried the following code but it keeps asking me to enter the v_today parameter.

       

      def v_today =
      select to_char(sysdate, 'yyyymmdd') v_today
           from dual;

      spool C:\&&v_today\Test.csv
      select....

      spool off
      undef v_today

       

      Can someone correct the above?

       

      Thanks.