Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    11

    Question Unanswered: Filename with system date and time

    How can I create a file " filename_<sys date time>.txt " using SPOOL command ?
    Regards,

    Ajay Patel

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Filename with system date and time

    SQL> column filename new_value fname
    SQL> select 'filename_' || to_char(sysdate,'YYYYMMDD_HH24MISS') || '.txt' as filename
    2 from dual;

    FILENAME
    ----------------------------
    filename_20040204_134046.txt

    1 row selected.

    SQL> spool &fname

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •