In an UNLOAD TO file, values of complex data types appear as follows:
constructor{val1 , val2 , ... }
For example, to unload the SET values {1, 3, 4} from a column of the SET (INTEGER NOT NULL) data type, the corresponding field of the UNLOAD TO file appears as follows:
|SET{1 , 3 , 4}|
ROW(val1 , val2 , ... )
For example, to unload the ROW values (1, 'abc'), the corresponding field of the UNLOAD TO file appears as follows:
|ROW(1 , abc)|
Use the DELIMITER clause to specify the delimiter that separates the data contained in each column in a row in the output file. If you omit this clause, then DB–Access checks the setting of the DBDELIMITER environment variable. If DBDELIMITER has not been set, the default delimiter is the pipe ( | ) symbol. You can specify TAB (CTRL-I) or a blank space (ASCII 32) as the delimiter symbol, but the following characters are not valid in any locale as delimiter symbols:
The backslash ( \ ) is not a valid field separator or record delimiter because it is the default escape character, indicating that the next character is a literal character in the data, rather than a special character.
The following statement specifies the semicolon ( ; ) as the delimiter:
UNLOAD TO 'cust.out' DELIMITER ';' SELECT fname, lname, company, city FROM customer
C-style comment indicators ( /* . . . */ ) are not valid for comments in the LOAD or UNLOAD statements. Use double hyphen ( -- ) or braces ( { ... } ) instead.
Related statements: LOAD and SELECT
For information about how to set environment variables, see the IBM Informix Guide to SQL: Reference.
For a discussion of the GLS aspects of the UNLOAD statement, see the IBM Informix GLS User's Guide.
For a task-oriented discussion of the UNLOAD statement and other utilities for moving data, see the IBM Informix Migration Guide.