date display in report [message #242802] |
Tue, 05 June 2007 03:10 |
lokhande.dinesh29
Messages: 36 Registered: May 2007
|
Member |
|
|
Hi all,
here in the below code, i don't want select statement. So, my question is how can i replace select statement here..?
SET TERMOUT OFF
COLUMN curdate NEW_VALUE report_date
SELECT TO_CHAR(SYSDATE,'dd-Mon-yyyy') curdate
FROM DUAL;
SET TERMOUT ON /*Mechanism to fetch date*/
ttitle left report_date center "Permission Code report" right "Page" format 999 sql.pno
Output of above code like this:
05-Jun-2007 Permission Code report Page 1
Thanks & regards,
dinesh
|
|
|
|
|
|
|
|
|
Re: date display in report [message #242860 is a reply to message #242849] |
Tue, 05 June 2007 05:42 |
tahpush
Messages: 961 Registered: August 2006 Location: Stockholm/Sweden
|
Senior Member |
|
|
By default the date and the time will appear if you just do a ttitle and do not qualify it (left ,center etc).
ex. (sorry for swedish output)
SQL> ttitle 'date is displayed'
SQL> select 'x' from dual;
Tis Jun 05 sidan 1
date is displayed
'
-
x
SQL> ttitle left 'date is not displayed'
SQL> select 'x' from dual;
date is not displayed
'
-
x
You have to do has Michel suggested if you want exactly the output you wrote in your first post.
|
|
|