Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Display Current Date on Heading Title (TTITLE)

705974Jan 22 2010 — edited Jan 22 2010
I am using sql*plus to write a report. I would like for the current date (and time if possible) to be displayed in the title of my report (TTITLE.) It appears that I'm supposed to use a system variable called, _DATE, but I'm not sure what to do. I'm running sql*plus v.10.2.

Here is my code. How can I include the current date to be displayed in the "RIGHT" side of the TTITLE heading?
TTITLE ON
TTITLE LEFT 'MY COMPANY' CENTER 'Weekly Invoice Totals for Cost Center: 10 - MANAGEMENT' RIGHT 'Date: ' 

set pagesize 66
set linesize 120
set wrap off

column vendor_name heading 'Supplier' format a40
column invoice_num heading 'Invoice Number' format a30
column invoice_amount heading 'Invoice Amount' format 999,999,999.99

set underline =
compute sum label TOTAL of invoice_amount on vendor_name
break on vendor_name skip 2

SELECT 
po_v.vendor_name,
ap_inv.invoice_num,
ap_inv.invoice_amount,
FROM
ap.ap_invoices_all ap_inv,
po.po_vendors po_v,
WHERE
ap_inv.vendor_id = po_v.vendor_id and
ap_inv.creation_date > SYSDATE-10;
This post has been answered by Solomon Yakobson on Jan 22 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2010
Added on Jan 22 2010
6 comments
3,931 views