17.5.3 Specification format of field data (CSV format)
The following table describes the specification format of field data.
No. |
Data type |
Specification format of field data |
||||
---|---|---|---|---|---|---|
Format |
Specification example |
Notes |
Empty string specification example#1 |
|||
1 |
Numeric data |
INTEGER |
|
|
|
If none is specified in the -k option, examples that use the enclosing character cannot be specified. |
2 |
SMALLINT |
|
|
|
Same as No. 1 |
|
3 |
DECIMAL |
[{+|-}]
|
|
|
Same as No. 1 |
|
4 |
DOUBLE PRECISION |
[{+|-}]
|
|
|
Same as No. 1 |
|
5 |
Character string data |
CHARACTER |
|
|
|
Single-byte spaces and tab characters cannot be inserted. If none is specified in the -k option, examples that use the enclosing character cannot be specified. |
6 |
VARCHAR |
|
|
|
The enclosing character cannot be specified. Furthermore, single-byte spaces and tab characters cannot be inserted. ■ When data with a length of zero is specified
If none is specified in the -k option, data with a length of zero cannot be specified. |
|
7 |
Datetime data |
DATE |
{YYYY-MM-DD
|
|
|
Same as No. 1 |
8 |
TIME |
|
|
|
Same as No. 1 |
|
9 |
TIMESTAMP |
{YYYY-MM-DD |YYYY/MM/DD}
|
|
|
Same as No. 1 |
|
10 |
Binary data |
BINARY |
For hexadecimal strings
|
|
|
Same as No. 1 |
11 |
For binary strings
|
|
|
Same as No. 1 |
||
12 |
VARBINARY |
For hexadecimal strings
|
|
|
If none is specified in the -k option, examples that use the enclosing character cannot be specified. ■ When data with a length of zero is specified
If none is specified in the -k option, data with a length of zero cannot be specified. |
|
13 |
For binary strings
|
|
|
Same as No. 12 |
- Legend:
-
Δ: One or more single-byte spaces or tab characters
,: Delimiter
": Enclosing character
- #1
-
If you specify an empty string when the DEFAULT clause is specified for a column at the storage location, the default value for the column is stored. When the DEFAULT clause is not specified for a column at the storage location, the null value is stored. If you want to store the null value in a column for which the DEFAULT clause has been specified, set the value of adb_import_null_string to NULL.
For details about the actual values to be stored in the target columns, see 17.8 Value that is stored for empty-string input data.
- #2
-
If one or more single-byte spaces (0x20) or tab characters (0x09) are entered before or after a character, those single-byte spaces or tab characters are deleted.
Example: Δ1 Δ23 4 -> 1234
If all the data is deleted, an empty string is assumed.
- #3
-
Any low-order digits that do not fit the scaling of the storage destination are discarded.
- #4
-
If the exponent is omitted, +0 is assumed to be the exponent.
- #5
-
Digit cancellation might occur depending on the specified value.
- #6
-
If the input data is shorter than the defined length, trailing spaces are added.
- #7
-
If the fraction of a second (nn...n) is shorter than the fractional seconds precision for the table's data type, trailing zeros are added.
If the fraction of a second (nn...n) exceeds the fractional seconds precision for the table's data type, the input data is truncated.
- #8
-
A logical error results if the number of characters in the hexadecimal string is not a multiple of 2.
A logical error results if the number of characters in the binary string is not a multiple of 8.
- #9
-
If the input data is shorter than the definition length, 0x00 is stored in the remaining portion.