EasyManua.ls Logo

Sybase Adaptive Server Anywhere - OUTPUT Statement [Interactive SQL]

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9 SQL Statements
573
OUTPUT statement [Interactive SQL]
Use this statement to output the current query results to a file.
OUTPUT TO
filename
… [ APPEND ]
… [ VERBOSE ]
… [ FORMAT
output_format
]
… [ ESCAPE CHARACTER
character
]
… [ DELIMITED BY
string
]
… [ QUOTE
string
[ ALL ] ]
… [ COLUMN WIDTHS (
integer
, …) ]
… [ HEXADECIMAL { ON | OFF } ]
output-format
:
ASCII | DBASE | DBASEII | DBASEIII | EXCEL
| FIXED | FOXPRO | HTML | LOTUS | SQL
None.
The current query results that are displayed in the Interactive SQL data
window are repositioned to the top.
"SELECT statement" on page 601
"INPUT statement" on page 550
The OUTPUT statement copies the information retrieved by the current
query to a file.
If you include the optional APPEND keyword, you can append the results of
the query to the end of an existing file. If you include the optional
VERBOSE keyword, you can append any messages about the query to the
end of the file. Both the APPEND and VERBOSE keywords are only valid if
the output format is ASCII, Fixed, or SQL.
The output format can be specified with the optional FORMAT clause. If no
FORMAT clause is specified, the Interactive SQL OUTPUT_FORMAT
option setting is used (see "OUTPUT_FORMAT option" on page 202).
The current query is the SELECT or INPUT statement which generated the
information displayed in the Interactive SQL data window. The OUTPUT
statement will report an error if there is no current query.
When exporting Java data, you may wish to export objects as binary, or you
may want to export them as strings using the toString() method. You
can control which way Java data is exported using the
DESCRIBE_JAVA_FORMAT Interactive SQL option.
For example, consider the following script:
Function
Syntax
Permissions
Side effects
See also
Description

Table of Contents

Related product manuals