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!

sql*plus - formatting issues

SuriSep 14 2015 — edited Sep 14 2015

Hi Experts,

I'm trying to generate few reports using SQL*PLUS tool ( SQL*Plus: Release 11.2.0.1.0). I'm facing issues in formatting the output.

I've developed a .sql script like below.

SET TERMOUT OFF

SET PAGESIZE 50000

SET LINESIZE 32767

SET TRIMSPOOL ON

SET COLSEP ' '

SET NULL NULLL

SPOOL 'C:\Users\Suri\sampleresults.txt'

TTITLE LEFT 'Validate ename details' skip 1

select * from emp where ename is null;

TTITLE LEFT 'Employees without manager details' skip 2

select * from emp where mgr is null;

SPOOL OFF;

Output:

no rows selected

Employees without manager details

employeedetails

In the output file TITLE is not displaying whenever there are no rows selected ? Also I am not seeing any new lines even after mentioning SKIP 1 or 2.

Thanks in advance for all your help.

This post has been answered by KayK on Sep 14 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2015
Added on Sep 14 2015
3 comments
255 views