The
system function SysLib.loadTable loads data from a file into a relational
database.
SysLib.loadTable(
fileName STRING in,
insertIntoClause 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.
- insertIntoClause
- Specify the table and columns that will provide the data. Use the syntax
of an INSERT clause in an SQL INSERT statement, as in this example:
"INSERT INTO myTable(column1, column2)"
A
clause like the following is sufficient if the file includes values for all
table columns in column order:
"INSERT INTO myTable"
- delimiter
- Specifies the symbol that separates 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 unload information from a relational database table and insert
it into a file, use the SysLib.unloadTable function.