How to Create a Matrix Report in SQL*Plus (Doc ID 262875.1)

Last updated on JUNE 02, 2017

Applies to:

SQL*Plus - Version 8.0.6.0 to 11.2.0.4 [Release 8.0.6 to 11.2]
Information in this document applies to any platform.
Information in this document applies to any platform.
This query can be applied to earlier version of the sqlplus ..

Goal

When you query any table in relational database, the data is represented as row format .
That means each record in the table is represented in row.
But to analyze the data the above format would not be enough , there you need data in 3-dimensional format i.e. to represent in rectangular format ( popularly know as matrix format.)

Where you will have a row attribute, column attribute and cell which shows the values for the corresponding row and column attribute. 

Example:

Col1 Col2 Col3 Col4

Row1
Row2
Row3
Row4

How to achieve the same in sqlplus without using any other tools?

Note:- The same output format can be easily designed thru Oracle Reports writer.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms