Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-390 Import/export fails with table names that are quoted in SQL like import to table "Order"
  3. DERBY-426

documentation need to be modified to reflect the derby-390 fix(once it is committed) , schem , table , column names need to be in case-sensitive form.

    XMLWordPrintableJSON

Details

    Description

      Tools utilities Guide: Using bulk import/export chapter:

      BulkImport/ Arguments to the import procedure section: add the following in the end:

      If you created a schema, table or column name as a non-delimited identifier, you must pass the name in all upper case. If you created a schema, table or column name as a delimited identifier, you must pass the name in the same case as it was created.

      BulkExport/Arguments to the export procedure: add the following in the end:
      If you have created a schema or table name as a non-delimited identifier, you must pass the name in all upper case. If you created a schema or table name as a delimited identifier, you must pass the name in the same case as it was created.

      Examples of bulk import and export section: Add the following two examples to this section:

      The following example shows how to import data into the Order table (this table was created using delimited quotes to specify the name becuase the word 'Order' is a SQL reserved word) table in a sample database from the myfile.del file.

      CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE (null,'Order','myfile.del',null,null,null,0);

      The following example shows how to export data from the Order table (this table was created using delimited quotes to specify the name becuase the word 'Order' is a SQL reserved word) in a sample database from the myfile.del file.

      CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (null,'Order','myfile.del',null,null,null);

      Modify the table name 'staff' to all upper case 'STAFF'
      for all import/export statements except for EXPORT_QUERY example.

      for example:
      CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE (null,'staff','myfile.del',null,null, null,0);
      toCALL SYSCS_UTIL.SYSCS_IMPORT_TABLE (null,'STAFF,'myfile.del',null,null,null,0);

      Importing into tables with identity columns section : modify table name 'tab1' to 'TAB1' and all column names
      also to upper case:

      CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (NULL, 'tab1', 'c1,c3,c4' , null, 'myfile.del',null, null,null,0)
      to
      CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (NULL, 'TAB1', 'C1,C3,C4' , null, 'myfile.del',null, null,null,0)

      CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (NULL, 'tab1', 'c1,c3,c4' , '1,3,4','empfile.del',null, null,null,0)
      to
      CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (NULL, 'TAB1', 'C1,C3,C4' , '1,3,4','empfile.del',null, null,null,0)

      Executing import/export procedures from JDBC: modify
      ps.setString(2,"staff");
      to
      ps.setString(2,"STAFF");

      CODESET values for import/export section:
      CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (NULL,'staff','staff.dat',NULL,NULL,'UTF-8')
      to
      CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE(NULL,'STAFF','staff.dat',NULL,NULL,'UTF-8')

      and
      CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(NULL,'STAFF','staff.dat',NULL,NULL,'UTF-8',0)

      In the REFERENCE Book Please do the following changes to import/export procedures:
      SYSCS_UTIL.SYSCS_EXPORT_TABLE:
      add the following before the example:

      If you have created a schema or table name as a non-delimited identifier, you must pass the name in all upper case. If you created a schema or table name as a delimited identifier, you must pass the name in the same case as it was created.

      modify tablename 'staff' to upper case 'STAFF'
      CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (null, 'staff', 'myfile.del', null, null, null)
      to
      CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (null, 'STAFF', 'myfile.del', null, null, null)

      SYSCS_UTIL.SYSCS_IMPORT_TABLE section:
      add the following before the example:
      If you created a schema or table name as a non-delimited identifier, you must pass the name in all upper case. If you created a schema or table name as a delimited identifier, you must pass the name in the same case as it was created.

      modify table name 'staff' to 'STAFF'
      CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(null, 'staff', 'c:/output/myfile.del', ';', '%', null,0);
      to
      CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(null, 'STAFF', 'c:/output/myfile.del', ';', '%', null,0);

      SYSCS_UTIL.SYSCS_IMPORT_DATA section:
      If you created a schema, table or column name as a non-delimited identifier, you must pass the name in all upper case. If you created a schema, table or column name as a delimited identifier, you must pass the name in the same case as it was created

      modify
      CALL SYSCS_UTIL.SYSCS_IMPORT_DATA(NULL, 'staff', null, '1,3,4', 'data.del', null, null, null,0)
      to
      CALL SYSCS_UTIL.SYSCS_IMPORT_DATA(NULL, 'STAFF', null, '1,3,4', 'data.del', null, null, null,0)

      Attachments

        1. derby426modified.zip
          22 kB
          Jeff Levitt

        Activity

          People

            jlevitt Jeff Levitt
            tsuresh Suresh Thalamati
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: