Converting data on insertion
212
•
Use any character other than Y, M, J, or D to indicate the separator
character you want Adaptive Server IQ to skip over. You can even use
blanks.
•
If a
DATE
format includes only a year and a day number within the year,
Adaptive Server IQ treats the date as a Julian date. For example, 1998-33
is the 33rd day in the year 1998, or February 2, 1998.
•
If a year is specified with only two digits, for example "5/27/32", then
Adaptive Server IQ converts it to 19yy or 20yy, depending on the year and
on the setting of the
NEAREST_CENTURY
option.
For more information, see “Database Options” in the Adaptive Server IQ
Reference Manual.
The DATETIME conversion option
Use the
DATETIME
conversion option to insert ASCII data that is stored in a
fixed format into a
TIME
or
TIMESTAMP
or
DATETIME
column. This option
converts the ASCII data input to binary and specifies the format of the input
data. (The
DATETIME
format is used internally to interpret the input; it does not
affect the storage or output format of the data.) See the
ASCII
conversion format
for more information.
Note
For compatibility with previous releases, you can specify that a column
contains
DATETIME
data. However, such data is stored internally as the
equivalent format,
TIMESTAMP
.
Here is the syntax:
DATETIME (’
input_date/time_format’)
In this UNIX example, slashes are separators in the date portion of the input
data, and colons are separators in the time portion:
LOAD TABLE lineitem(
NEAREST_CENTURY
setting
Year specified as
Years assumed
Default (50)
00-49
50-99
2000-2049
1950-1999
0
any
1900s
100
any
2000s
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...