You can use the Derby import procedures to import all of the data from table or query, or to import LOB data separately from the other data.
Type of import | Procedure to use |
---|---|
To import all the data to a table, where the import file contains the LOB data | SYSCS_UTIL.SYSCS_IMPORT_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), IN REPLACE SMALLINT) |
To import the data to a table, where the LOB data is stored in a separate file and the main import file contains all of the other data with a reference to the LOB data | SYSCS_UTIL.SYSCS_IMPORT_TABLE_LOBS_FROM_EXTFILE (IN SCHEMANAME VARCHAR(128), IN TABLENAME VARCHAR(128), IN FILENAME VARCHAR(32672), IN COLUMNDELIMITER CHAR(1), IN CHARACTERDELIMITER CHAR(1), IN CODESET VARCHAR(128), IN REPLACE SMALLINT) The import utility looks in the main import file for a reference to the location of the LOB data. The format of the reference to the LOB stored in the main import file must be lobsFileName.Offset.length/. |
To import data from a file to a subset of columns in a table, where the import file contains the LOB data | SYSCS_UTIL.SYSCS_IMPORT_DATA (IN SCHEMANAME VARCHAR(128), IN TABLENAME VARCHAR(128), IN INSERTCOLUMNS VARCHAR(32672), IN COLUMNINDEXES VARCHAR(32672), IN FILENAME VARCHAR(32672), IN COLUMNDELIMITER CHAR(1), IN CHARACTERDELIMITER CHAR(1), IN CODESET VARCHAR(128), IN REPLACE SMALLINT) You must specify the insertColumns parameter on the table into which data will be imported. You must specify the columnIndex parameter to import data fields from a file to column in a table. |
To import data to a subset of columns in a table, where the LOB data is stored in a separate file and the main import file contains all of the other data with a reference to the LOB data | SYSCS_UTIL.SYSCS_IMPORT_DATA_LOBS_FROM_EXTFILE (IN SCHEMANAME VARCHAR(128), IN TABLENAME VARCHAR(128), IN INSERTCOLUMNS VARCHAR(32672), IN COLUMNINDEXES VARCHAR(32672), IN FILENAME VARCHAR(32672), IN COLUMNDELIMITER CHAR(1), IN CHARACTERDELIMITER CHAR(1), IN CODESET VARCHAR(128), IN REPLACE SMALLINT) The import utility looks in the main import file for a reference to the location of the LOB data. The format of the reference to the LOB stored in the main import file must be lobsFileName.Offset.length/. |