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.

    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)

        Activity

        Hide
        Andrew McIntyre added a comment -

        Committed to trunk (225427) and 10.1 doc branch (225428).

        Show
        Andrew McIntyre added a comment - Committed to trunk (225427) and 10.1 doc branch (225428).
        Hide
        Suresh Thalamati added a comment -

        Changes looks good.

        Show
        Suresh Thalamati added a comment - Changes looks good.
        Hide
        Jeff Levitt added a comment -

        Attached patch includes Suresh's feedback. Please take a look at the included sample output and let me know if there are any other changes that need to be made.

        Thanks!

        Show
        Jeff Levitt added a comment - Attached patch includes Suresh's feedback. Please take a look at the included sample output and let me know if there are any other changes that need to be made. Thanks!
        Hide
        Suresh Thalamati added a comment -

        Thanks for making the changes Jeff, Changes are good , except for the following minor error:
        Export procedures does not take column names as parameter. So following statement
        in the export documentaion should not contain column name .

        rrefexportproc.html:
        If you create a schema, table, or column name s a non-delimited identifier, you must pass the name to the export procedure using all upper-case ...........

        should be :
        If you create a schema or table name as a non-delimited identifier, you must pass the name to the export procedure using all upper-case ..........

        rtoolsexportarguements.html: (just remove the column word)
        If you create a schema, table, or column name s a non-delimited identifier, you must pass the name to the export procedure using all upper-case ........

        should be modified (just remove the column word ):
        If you create a schema or table name as a non-delimited identifier, you must pass the name to the export procedure using all upper-case

        -suresht

        Show
        Suresh Thalamati added a comment - Thanks for making the changes Jeff, Changes are good , except for the following minor error: Export procedures does not take column names as parameter. So following statement in the export documentaion should not contain column name . rrefexportproc.html: If you create a schema, table, or column name s a non-delimited identifier, you must pass the name to the export procedure using all upper-case ........... should be : If you create a schema or table name as a non-delimited identifier, you must pass the name to the export procedure using all upper-case .......... rtoolsexportarguements.html: (just remove the column word) If you create a schema, table, or column name s a non-delimited identifier, you must pass the name to the export procedure using all upper-case ........ should be modified (just remove the column word ): If you create a schema or table name as a non-delimited identifier, you must pass the name to the export procedure using all upper-case -suresht
        Hide
        Jeff Levitt added a comment -

        Attached zip includes the patch as requested plus sample html output for all of the files affected. If this is OK, can we commit this to the main codeline as well as the 10.1 branch? How do we do that?

        Show
        Jeff Levitt added a comment - Attached zip includes the patch as requested plus sample html output for all of the files affected. If this is OK, can we commit this to the main codeline as well as the 10.1 branch? How do we do that?
        Hide
        Suresh Thalamati added a comment -

        Fix for Derby-390 , that required the suggested doc change in this bug is committed to 10.1 branch. It woud be great if some one with doc expertise, do the modifcations to the docs to the 10.1 branch.

        Show
        Suresh Thalamati added a comment - Fix for Derby-390 , that required the suggested doc change in this bug is committed to 10.1 branch. It woud be great if some one with doc expertise, do the modifcations to the docs to the 10.1 branch.

          People

          • Assignee:
            Jeff Levitt
            Reporter:
            Suresh Thalamati
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development