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 REPORT(MASTER/DETAIL REPORTS)

ora_1978May 26 2008 — edited May 26 2008
I have 14 records in EMP table.
The columns are:
------------------
EMPNO
ENAME
JOB
MGR
HIREDATE
SAL
COMM
DEPTNO
A1
A2

I am performing sql*plus reports(Master / Detail Report)

I want the report as below:

Dept No : 10
eno ename sal .. .. ..
1 kanishk 10000
2 Ragul 20000

Dept : 20
eno ename sal .. .. ..
3 kalyan 1000
4 Ragu 2000

.
.
.
.

But result is :

Dept No : 10
eno ename sal .. .. ..
1 kanishk 10000

Dept No : 10
eno ename sal .. .. ..
2 Ragul 20000

Dept : 20
eno ename sal .. .. ..
3 kalyan 1000

Dept : 20
eno ename sal .. .. ..
4 Ragu 2000





The below are the steps performed:

COLUMN DEPTNO NEW_VALUE DNO NOPRINT
TTITLE LEFT 'DEPT: ' DNO SKIP 2
BREAK ON DEPTNO SKIP PAGE
BTITLE OFF

SELECT * FROM EMP ;

The report is printing the deptno more than once.The records are
not grouped for the deptno.

clarify
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2008
Added on May 26 2008
2 comments
436 views