|
|
Data Description Headers and Files
Data description headers and files are used to describe the data that follows.
The following table describes data description header elements:
As shown in the table above, the characters used to specify column separators, text qualifiers and NULL indicators must be enclosed in single quotes. If you use a single quote to specify a column separator, text qualifier or NULL indicator, you must enter it twice, for example, you would specify a single quote as a column separator as ''''.
Data Description Header Examples
For data unloaded from a Mimer SQL database using UNLOAD, the data description header generated could look as follows:
#data escape mode using insert into t (c) values (?);The example above implies the following for LOAD: the column separator is the comma character (default). Text strings are presumed to be unqualified or qualified with the double quote character. Data escaping is assumed (see the table below). The USING statement in the header will be used if no USING clause is given in the LOAD statement.
The following is another example of a data description header where all optional elements mentioned above, except data escape mode, are used:
# column separator ':' text qualifier '!' null indicator '§' using insert into t1 (c1,c2,c3) values (?,?,?);In the example above, the table t1 and the columns c1, c2 and c3 are supposed to exist when starting the data load. Specific characters for column separator, text qualifier and null indicator are defined.
Escape Character Sequences
If data escape mode is specified, the back-slash character (\) is used as the escape character. The character following the escape character can be one of 'x', 'u', '-' or '_'. See the following table for a description of valid escape character sequences:
Note: If you do not use data escape mode, end of file is treated as end of table. This means that such a data file only can contain data for one table.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|