chapter 14 formatting readable output

21
Chapter 14 Formatting Readable Output

Upload: keala

Post on 09-Feb-2016

75 views

Category:

Documents


0 download

DESCRIPTION

Chapter 14 Formatting Readable Output. Basic Report Creation in SQL*Plus. Enter format for the report Enter a query to retrieve data. COLUMN Command. Formats both column heading and data displayed in column. COLUMN Command Options. FORMAT Option. Specifies format model for the data. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 14 Formatting Readable Output

Chapter 14Formatting Readable

Output

Page 2: Chapter 14 Formatting Readable Output

Basic Report Creation in SQL*Plus Enter format for the report Enter a query to retrieve data

Page 3: Chapter 14 Formatting Readable Output

COLUMN Command

Formats both column heading and data displayed in column

Page 4: Chapter 14 Formatting Readable Output

COLUMN Command Options

Page 5: Chapter 14 Formatting Readable Output

FORMAT Option

Specifies format model for the data

Page 6: Chapter 14 Formatting Readable Output

FORMAT Example

Page 7: Chapter 14 Formatting Readable Output

HEADING Option

Specifies a column heading

Page 8: Chapter 14 Formatting Readable Output

Output with HEADING Option

Page 9: Chapter 14 Formatting Readable Output

SET Command

SET command used to change the UNDERLINE variable

Assign blank space to add separator with FORMAT option of COLUMN command

Page 10: Chapter 14 Formatting Readable Output

Modified Report

Page 11: Chapter 14 Formatting Readable Output

NULL Option

Provides substitute for NULL values

Page 12: Chapter 14 Formatting Readable Output

Report Headers and Footers

Header– Appears at top of reports– Created with TTITLE command

Footer– Appears at bottom of reports– Created with BTITLE command

Page 13: Chapter 14 Formatting Readable Output

TTITLE and BTITLE Options

Page 14: Chapter 14 Formatting Readable Output

SQL*Plus Variables

Page 15: Chapter 14 Formatting Readable Output

BREAK Command

Suppresses duplicate data Allows blank lines after groups

Page 16: Chapter 14 Formatting Readable Output

BREAK Command Example

Page 17: Chapter 14 Formatting Readable Output

CLEAR Command

Used to clear settings applied to the BREAK and COLUMN commands

Page 18: Chapter 14 Formatting Readable Output

COMPUTE Command

Can include AVG, SUM, COUNT, MAX, or MIN keywords

Page 19: Chapter 14 Formatting Readable Output

COMPUTE Command Example

Page 20: Chapter 14 Formatting Readable Output

SPOOL Command

Saves results to text file

Page 21: Chapter 14 Formatting Readable Output

SPOOL Command Example