EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 569

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
551
ESCAPE CHARACTER clause The default escape character for
hexadecimal codes and symbols is a backslash (\), so \x0A is the linefeed
character, for example.
The escape character can be changed, using the ESCAPE CHARACTER
clause. For example, to use the exclamation mark as the escape character,
you would enter:
... ESCAPE CHARACTER ’!’
Only one single-byte character can be used as an escape character.
BY clause The BY clause allows the user to specify whether the columns
from the input file should be matched up with the table columns based on
their ordinal position in the lists (ORDER, the default) or by their names
(NAME). Not all input formats have column name information in the file.
NAME is allowed only for those formats that do. They are the same formats
that allow automatic table creation: DBASEII, DBASEIII, FOXPRO, and
LOTUS.
DELIMITED BY clause The DELIMITED BY clause allows you to
specify a string to be used as the delimiter in ASCII input format.
COLUMN WIDTHS clause COLUMN WIDTHS can be specified for
FIXED format only. It specifies the widths of the columns in the input file. If
COLUMN WIDTHS is not specified, the widths are determined by the
database column types. This clause should not be used if inserting
LONG VARCHAR or BINARY data in FIXED format.
NOSTRIP clause Normally, for ASCII input format, trailing blanks will
be stripped from unquoted strings before the value is inserted. NOSTRIP can
be used to suppress trailing blank stripping. Trailing blanks are not stripped
from quoted strings, regardless of whether the option is used. Leading blanks
are stripped from unquoted strings, regardless of the NOSTRIP option
setting.
If the ASCII file has entries such that a column appears to be null, it is
treated as NULL. If the column in that position cannot be NULL, a zero is
inserted in numeric columns and an empty string in character columns.
FORMAT clause Each set of values must occupy one input line and must
be in the format specified by the FORMAT clause, or the format set by the
SET INPUT_FORMAT statement if the FORMAT clause is not specified.
When input is entered by the user, an empty screen is provided for the user to
enter one row per line in the input format.
Parameters

Table of Contents

Related product manuals