This discussion is archived
4 Replies Latest reply: Jan 22, 2013 11:04 PM by Mihael RSS

SPOOL Log file File to Local Drive with prefixing system date?

user10636796 Newbie
Currently Being Moderated
Hi, Everyone,

I am using oracle 11.1.0.6 version.

I am trying to run my pl/sql package using a control script which uses a spool to write a log file to my local drive. While executing i am getting an error saying invalid file name.

could anyone please help?


SET SERVEROUTPUT ON;

SPOOL c:\||TO_CHAR(SYSDATE,'DD/MM/YYYY HH24:MI')||'_rlv.log' APPEND;

SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY hh24:mi') FROM DUAL;

EXEC PAC_RLV.CALL_ALL();

SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY hh24:mi') FROM DUAL;


I need the sysdate as the prefix for my log file.

Thanks in advance

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points