Sybase 12.4.2 Server User Manual


 
CHAPTER 5 Moving Data In and Out of Databases
213
l_quantity ASCII(4),
l_shipdate DATETIME(’MM/DD/YY hh:mm:ss’),
FILLER(1))
FROM ’/d1/MILL1/tt.t’
BLOCK FACTOR 1000
PREVIEW ON
In this UNIX example, the FILLER(1) clause prevents Adaptive Server IQ
from inserting a NULL in the next column (VWAP) after the DATETIME
column:
LOAD TABLE snapquote_stats_base
SYMBOL ‘\x09’,
snaptime DATETIME('MM/DD/YY hh:mm:ss'),
FILLER(1))
VWAP ‘\x09’,
RS_DAY ‘\x09’,
FROM '/d1/MILL1/tt.t'
BLOCK FACTOR 1000
PREVIEW ON
In this UNIX example, the destination columns contain TIME data, but the input
data is
DATETIME. You use the TIME conversion option, and use FILLER to skip
over the date portion.
LOAD TABLE customer(
open_time TIME('hh:mmaa'),
close_time TIME('hh:mmaa'),
FILLER(9))
FROM '/d1/MILL1/tt.t'
BLOCK FACTOR 1000
PREVIEW ON
Specifying the format for DATETIME conversions
Specify the format of the DATETIME input data using:
Y or y for years
M or m for months
D or d for days
H or h to indicate hours
N or n to indicate minutes (mm is also accepted when colons are used as
separators
S or s to indicate seconds and fraction of a second