Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

OUTPUT

The OUTPUT statement writes query results in an operating-system file, or pipes query results to another program

This statement is an extension to the ANSI/ISO standard for SQL. You can use this statement only with DB–Access.

Syntax

Read syntax diagramSkip visual syntax diagram>>-OUTPUT TO--+-filename-------------+--+------------------+---->
              |  (1)                 |  '-WITHOUT HEADINGS-'
              '-------PIPE---program-'
 
                        (2)
>--| SELECT Statement |----------------------------------------><
 
Notes:
  1. UNIX only
  2. See SELECT

Element Description Restrictions Syntax
filename Path and filename where query results are written. The default path is the current directory. Can specify a new or existing file. If the file exists, query results overwrite the current contents of the file. Must conform to the rules of your operating system.
program Name of a program to receive the query results as input Program must exist, must be known to the operating system, and must be able to read the results of a query. Must conform to the rules of your operating system.

Usage

You can use the OUTPUT statement to direct the results of a query to an operating-system file or to a program. You can also specify whether column headings should be omitted from the query output.

C-style comments are not valid within the OUTPUT statement.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]