Listen Software's How To: SQL Plus Reports and Commands

Monday Mar 25th 2002 by David Nishimoto

Examples of how to build SQL Plus reports, including header, title, column names, linesize, pagesize, format specification, and spooling commands.

  • set headsep--identifies a single character to split a title onto two or more lines
  • ttitle--Top Title
  • btitle--Bottom Title
  • column--Heading and format of a column
  • break on--Spaces between the section
  • compute sum--Calculate subtotals
  • set linesize--Set the maximum number of characters per line
  • set pagesize--Set the number of lines per page
  • set newpage--Set the number of lines between pages
  • spool--Move screen I/O to file I/O
  • set pause--Makes screen display stop between pages
  • save--Save an sql query to file
  • host--Sends commands to the host operating system
  • start--Execute sql from a file
  • edit--Edit sql stored in a file
  • define_editor--name the editor


column {field name} heading 'Enter Column Description' 
   format ann \| 9990.99  truncate \| word_wrapped

Other Commands

  • list--Outputs the contents of the SQL Buffer
  • clear buffer--Removes the contents of the SQL Buffer
  • append--Add contents the end of the SQL Buffer
  • c\{search pattern}\{replace pattern}--Changes a search pattern with a replace pattern for the SQL Buffer.

Running SQL Statements

connect user/password@host

; or / -> to run SQL

@filename -> run the SQL in a file

Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved