The
system function
SysLib.unloadTable unloads data from a relational database
into a file.
SysLib.unloadTable(
fileName STRING in,
selectStatement STRING in
[, delimiter STRING in
])
- fileName
- The name of the file. The name is fully qualified or is relative to the
directory from which the program is invoked.
- selectStatement
- Specify the criteria for selecting data from the relational database.
Use the syntax of an SQL SELECT statement without including host variables;
for example:
"SELECT column1, column2 FROM myTABLE
WHERE column3 > 10"
- delimiter
- Specifies the symbol that will separate one value from the next in the
file. (One row of data must be separated from the next by the newline character.)
The
default symbol for delimiter is the value in the Java™ runtime
property vgj.default.databaseDelimiter; and the default value for that
property is a pipe (|).
The following symbols are not available:
- Hexadecimal characters (0 through 9, a through f, A through F)
- Backslash (\)
- The newline character or CONTROL-J
To load information from a file and insert it into a relational
database table, use the SysLib.loadTable function.