Chapter 14 Formatting Readable Output. Chapter Objectives Add a column heading with a line break to...
-
Upload
gerard-hudson -
Category
Documents
-
view
227 -
download
0
Transcript of Chapter 14 Formatting Readable Output. Chapter Objectives Add a column heading with a line break to...
Chapter 14Formatting Readable
Output
Chapter 14Formatting Readable
Output
Basic Report Creation in SQL*PlusBasic 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
COLUMN CommandCOLUMN Command
Formats both column heading and data displayed in columnFormats both column heading and data displayed in column
COLUMN Command OptionsCOLUMN Command Options
FORMAT OptionFORMAT Option
Specifies format model for the data Specifies format model for the data
FORMAT ExampleFORMAT Example
HEADING OptionHEADING Option
Specifies a column heading Specifies a column heading
Output with HEADING OptionOutput with HEADING Option
SET CommandSET 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
Modified ReportModified Report
NULL OptionNULL Option
Provides substitute for NULL valuesProvides substitute for NULL values
Report Headers and FootersReport 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
TTITLE and BTITLE OptionsTTITLE and BTITLE Options
SQL*Plus VariablesSQL*Plus Variables
BREAK CommandBREAK Command
Suppresses duplicate data Allows blank lines after groups
Suppresses duplicate data Allows blank lines after groups
BREAK Command ExampleBREAK Command Example
CLEAR CommandCLEAR Command
Used to clear settings applied to the BREAK and COLUMN commandsUsed to clear settings applied to the BREAK and COLUMN commands
COMPUTE CommandCOMPUTE Command
Can include AVG, SUM, COUNT, MAX, or MIN keywordsCan include AVG, SUM, COUNT, MAX, or MIN keywords
COMPUTE Command ExampleCOMPUTE Command Example
SPOOL CommandSPOOL Command
Saves results to text fileSaves results to text file
SPOOL Command ExampleSPOOL Command Example