SET TERMOUT OFF
COLUMN today_ddmmyyyy_col NEW_VALUE today_ddmmyyyy
SELECT TO_CHAR ( SYSDATE, 'DDMMYYYY') AS today_ddmmyyyy_col
FROM dual;
SET TERMOUT ON
SPOOL log_&today_ddmmyyyy..log
Thank you
Osama Mustafa
For the people who think differently Welcome aboard
SET TERMOUT OFF
COLUMN today_ddmmyyyy_col NEW_VALUE today_ddmmyyyy
SELECT TO_CHAR ( SYSDATE, 'DDMMYYYY') AS today_ddmmyyyy_col
FROM dual;
SET TERMOUT ON
SPOOL log_&today_ddmmyyyy..log
Thank you
Osama Mustafa
This comment has been removed by the author.
LikeLike
Hello.Thanks for read this comment.I have a question.I do not fix a problem about Spool in Oracle DB.I have to out a report with extension txt with dates about a simple select (select * from emp).I apply SET commands but I do not achieve that the file output delete a line on top the file.Example:—– this appear blank line in the TXT file —–“TEXTO1″;”TEXTO2″. . . .. ….”TEXTON”;”TEXTOM”My code:First file: @salida.sqlSecond file:SET PAGESIZE 1000 LINESIZE 200 ECHO OFF TRIMS ON FEEDBACK OFF HEA OFFSPOOL C:\dir_out\info.txt@inicial.sql;SPOOL OFFYou have any idea.???Thanks….
LikeLike
can you please rephrase your question , sorry i didn't understand you.
LikeLike