Report in SQLPLUS [message #246661] |
Thu, 21 June 2007 10:26 |
srinivasocp
Messages: 91 Registered: December 2005 Location: INDIA
|
Member |
|
|
Hi Guys,
In my sqlplus report i have set my ttitle as said below.I just want my sysdate to be displayed next to 'REPORT GENERATED ON <SYSDATE>'
Quote: | ttitle 'Report generated on sysdate'
|
The above quoted is not working i.e. is not showing the sysdate,instead it is just printing sysdate string as such.
How can i do that?Any suggestions.
Regards
Srini...
[Updated on: Thu, 21 June 2007 10:34] Report message to a moderator
|
|
|
|
Re: Report in SQLPLUS [message #246707 is a reply to message #246661] |
Thu, 21 June 2007 11:49 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
set verify off
COLUMN a new_val thisuser noprint
COLUMN b new_val todaysdate noprint
select USER a,
TO_CHAR(SYSDATE, 'YYYYmmdd_HH24MI') b
from dual;
spool mylog_&todaysdate..log
ttitle "This is my title &thisuser &todaysdate"
select 123 from dual;
prompt Logfile is mylog_&todaysdate..log
spool off
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production
Thu Jun 21 page 1
This is my title SCOTT 20070621_0947
123
----------
123
Logfile is mylog_20070621_0947.log
SQL>
|
|
|