Download presentation
Presentation is loading. Please wait.
Published byGerard Hudson Modified over 9 years ago
1
Chapter 14 Formatting Readable Output
2
Chapter Objectives Add a column heading with a line break to a report Format the appearance of numeric data in a column Specify the width of a column Add a column heading with a line break to a report Format the appearance of numeric data in a column Specify the width of a column
3
Chapter Objectives Substitute a text string for a NULL value in a report Add a multiple-line header to a report Display a page number in a report Add a footer to a report Substitute a text string for a NULL value in a report Add a multiple-line header to a report Display a page number in a report Add a footer to a report
4
Chapter Objectives Change the setting of an environment variable Suppress duplicate report data Clear changes made by the COLUMN and BREAK commands Perform calculations in a report Change the setting of an environment variable Suppress duplicate report data Clear changes made by the COLUMN and BREAK commands Perform calculations in a report
5
Basic Report Creation in SQL*Plus Enter format for the report Enter a query to retrieve data Enter format for the report Enter a query to retrieve data
6
COLUMN Command Formats both column heading and data displayed in column
7
COLUMN Command Options
8
FORMAT Option Specifies format model for the data
9
FORMAT Example
10
HEADING Option Specifies a column heading
11
Output with HEADING Option
12
SET Command SET command used to change the UNDERLINE variable Assign blank space to add separator with FORMAT option of COLUMN command SET command used to change the UNDERLINE variable Assign blank space to add separator with FORMAT option of COLUMN command
13
Modified Report
14
NULL Option Provides substitute for NULL values
15
Report Headers and Footers Header –Appears at top of reports –Created with TTITLE command Footer –Appears at bottom of reports –Created with BTITLE command Header –Appears at top of reports –Created with TTITLE command Footer –Appears at bottom of reports –Created with BTITLE command
16
TTITLE and BTITLE Options
17
SQL*Plus Variables
18
BREAK Command Suppresses duplicate data Allows blank lines after groups Suppresses duplicate data Allows blank lines after groups
19
BREAK Command Example
20
CLEAR Command Used to clear settings applied to the BREAK and COLUMN commands
21
COMPUTE Command Can include AVG, SUM, COUNT, MAX, or MIN keywords
22
COMPUTE Command Example
23
SPOOL Command Saves results to text file
24
SPOOL Command Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.