Adding report title to sql output

cms technology web page configuration drupal web site
Setup and configuration of cms and drupal web site

SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

'MYNAMEIS'||INITCAP(ENAME)||',ISTARTEDWORKON'||HIR
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>
SQL> ttitle "REPORT : Employee List."
SQL> run mynameis
1 select
2 'my name is ' || INITCAP(ename) ||
3 ', I started work on ' || hiredate
4* from emp

Tue Dec 19 page 1
REPORT : Employee List.

'MYNAMEIS'||INITCAP(ENAME)||',ISTARTEDWORKON'||HIR
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>
SQL>
SQL> edit mynameis

 

report name sql

 

SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

Tue Dec 19 page 1
REPORT : Employee List.

Below is a list of Employees
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>

SQL> ttitle right "Myreport Title"
SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

Myreport Title

Below is a list of Employees
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>

 

ADDING FOOTER:

SQL> btitle "Report Completed"
SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

Myreport Title

Below is a list of Employees
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82

 

Report Completed

SQL>

 

TO ON and OFF the title on the sql report

 

SQL> ttitle off
SQL> btitle off
SQL> select upper('&message') from dual;
old   1: select upper('&message') from dual
new   1: select upper('kakakakaka hehehehe') from dual

UPPER('KAKAKAKAKAHE
-------------------
KAKAKAKAKA HEHEHEHE


SQL> ttitle on
SQL> btitle on
SQL> select lower('&message') from dual;
old   1: select lower('&message') from dual
new   1: select lower('kakakakaka hehehehe') from dual

Tue Dec 19                                                             page    1
                                     REPORT


LOWER('KAKAKAKAKAHE
-------------------
kakakakaka hehehehe


                                Report Completed
SQL> 


Custom Search