1.0

Table Of Contents
Example
The following example shows how to export the information about employees in Department 20 from the STAFF
table in the SAMPLE database to the myfile.del le.
CALL SYSCS_UTIL.EXPORT_QUERY('select * from staff where dept =20',
'c:/output/awards.del', null, null, null);
SYSCS_UTIL.EXPORT_TABLE
Export all data from a table to an operating system le.
For security concerns, and to avoid accidental le damage, this EXPORT procedure does not export data into
an existing le. You must specify a lename in the EXPORT procedure that does not exist. When you run the
procedure the le is created and the data is exported into the new le.
The data is exported using a delimited le format. For example, you can use this command to export table data
as comma-separated values (a CSV le).
Syntax
SYSCS_UTIL.EXPORT_TABLE (IN SCHEMANAME VARCHAR(128),
IN TABLENAME VARCHAR(128), IN FILENAME VARCHAR(32672),
IN COLUMNDELIMITER CHAR(1), IN CHARACTERDELIMITER CHAR(1),
IN CODESET VARCHAR(128))
No result is returned from the procedure.
An input argument of type VARCHAR(128) that species the schema name of
the table. Passing a NULL value will use the default schema name.
SCHEMANAME
An input argument of type VARCHAR(128) that species the name of the
table/view from which the data is to be exported. Passing a null will result in an
error.
TABLENAME
Species the name of a new le to which the data is to be exported. If the path
is omitted, the current working directory is used. If the name of a le that already
FILENAME
exists is specied, the export procedure returns an error. The specied location
of the le should refer to the server-side location if you are using the Network
Server. Specifying a NULL value results in an error. The FILENAME parameter
takes an input argument that is a VARCHAR (32672) data type.
An input argument of type CHAR(1) that species a column delimiter. The
specied character is used in place of a comma to signal the end of a column.
COLUMNDELIMITER
Passing a NULL value will use the default value; the default value is a comma
(,).
An input argument of type CHAR(1) that species a character delimiter. The
specied character is used in place of double quotation marks to enclose a
CHARACTERDELIMITER
character string. Passing a NULL value will use the default value; the default
value is a double quotation mark (").
An input argument of type VARCHAR(128) that species the code set of the
data in the exported le. The name of the code set should be one of the
CODESET
Java-supported character encodings. Data is converted from the database code
set to the specied code set before writing to the le. Passing a NULL value
will write the data in the same code set as the node in which it is being executed.
If you create a schema or table name as a non-delimited identier, you must pass the name to the export procedure
using all uppercase characters. If you created a schema, table, or column name as a delimited identier, you
must pass the name to the export procedure using the same case that was used when it was created.
vFabric SQLFire User's Guide552
vFabric SQLFire Reference