The Date Option - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Converting data on insertion
Substitution of NULL or blank characters

The DATE Option

Example
Specifying the DATE Format
Option
yyyy or YYYY
yy or YY
210
Adaptive Server IQ supports zero-length
length of a
or
CHAR
VARCHAR
zero-length cell.
For all other data types, if the length of the cell is zero, Adaptive Server IQ
inserts a NULL.
This treatment of zero-length character data is ANSI behavior. If you require
non-ANSI behavior, see the Non_Ansi_Null_Varchar option in the Adaptive
Server IQ Reference Manual.
Use the
conversion option to insert ASCII data that is stored in a fixed
DATE
format into a
column. This option converts the ASCII data input to
DATE
binary and specifies the format of the input data. (The
internally to interpret the input; it does not affect the storage or output format
of the data.) See the
ASCII
In this Windows NT example, data for the
the specified format into binary. The 1–byte
in the input file.
LOAD TABLE lineitem(
l_orderkey NULLS(ZEROS) ASCII(4),
l_partkey ASCII(3),
l_shipdate DATE('MM/DD/YY'),
l_suppkey ASCII(5),
FILLER(1))
FROM 'C:\\MILL1\\shipinfo.t'
PREVIEW ON
Specify the format of the input data using y or Y for years, m or M for months,
d or D for days, and j or J for Julian days. The length of the format string is the
width of the input column. Table 5-7 describes the formatting options.
Table 5-7: Formatting dates
Meaning
Represents number of year. Default is 1900.
and
CHAR
cell is zero and the cell is not NULL, you get a
conversion format for more information.
l_shipdate
FILLER
data. If the
VARCHAR
format is used
DATE
column is converted from
skips over carriage returns

Advertisement

Table of Contents
loading

Table of Contents