Derby
  1. Derby
  2. DERBY-5337

Encountering error when importing to table using CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: None
    • Component/s: SQL
    • Environment:
      3GB RAM, Windows XP SP3, Core i-5
    • Urgency:
      Normal
    • Bug behavior facts:
      Seen in production

      Description

      I am encountering the following issue when trying to call CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE.
      I am passing the schema name as has been pointed out as a possible cause conflicting with multiple tables with the same name.
      The actual error is :
      CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE('DBA', 'TEST', 'C:/temp/unload/704.dat', ',', '"', 'UTF-8',0)

      The exception 'java.sql.SQLException: Column 'COLUMN2' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'COLUMN2' is not a column in the target table.' was thrown while evaluating an expression.

      This issue I am encountering in the 10.8.1.2 version of derby. I am using embedded driver

        Issue Links

          Activity

          Hide
          Rick Hillegas added a comment -

          Hi Ranjit,

          Could you post the CREATE TABLE statement for the table you are importing into? Thanks.

          Show
          Rick Hillegas added a comment - Hi Ranjit, Could you post the CREATE TABLE statement for the table you are importing into? Thanks.
          Hide
          Ranjit Aneesh added a comment -

          Below is the create table statement:

          CREATE TABLE "DBA"."TEST" (
          "ID" integer NOT NULL
          ,"Descendant" integer NOT NULL
          ,PRIMARY KEY ("ID","Descendant")
          )

          Show
          Ranjit Aneesh added a comment - Below is the create table statement: CREATE TABLE "DBA"."TEST" ( "ID" integer NOT NULL ,"Descendant" integer NOT NULL ,PRIMARY KEY ("ID","Descendant") )
          Hide
          Knut Anders Hatlen added a comment -

          I tried to reproduce this problem with Derby 10.8.2.2 by creating a file called 704.dat with these two lines:

          1,2
          3,4

          And then I successfully invoked the import procedure:

          ij> CREATE TABLE "DBA"."TEST" (
          "ID" integer NOT NULL
          ,"Descendant" integer NOT NULL
          ,PRIMARY KEY ("ID","Descendant")
          );
          0 rows inserted/updated/deleted
          ij> CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE('DBA', 'TEST', '704.dat', ',', '"', 'UTF-8',0);
          0 rows inserted/updated/deleted
          ij> SELECT * FROM DBA.TEST;
          ID |Descendant
          -----------------------
          1 |2
          3 |4

          2 rows selected

          I only see the same exception as the one mentioned in the bug description if the 704.dat file contains fewer columns than the actual table. You don't happen to still have the data file lying around so that you can verify that every line in the file contains exactly two integers separated by a comma, do you?

          Show
          Knut Anders Hatlen added a comment - I tried to reproduce this problem with Derby 10.8.2.2 by creating a file called 704.dat with these two lines: 1,2 3,4 And then I successfully invoked the import procedure: ij> CREATE TABLE "DBA"."TEST" ( "ID" integer NOT NULL ,"Descendant" integer NOT NULL ,PRIMARY KEY ("ID","Descendant") ); 0 rows inserted/updated/deleted ij> CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE('DBA', 'TEST', '704.dat', ',', '"', 'UTF-8',0); 0 rows inserted/updated/deleted ij> SELECT * FROM DBA.TEST; ID |Descendant ----------------------- 1 |2 3 |4 2 rows selected I only see the same exception as the one mentioned in the bug description if the 704.dat file contains fewer columns than the actual table. You don't happen to still have the data file lying around so that you can verify that every line in the file contains exactly two integers separated by a comma, do you?
          Hide
          Mamta A. Satoor added a comment -

          With the given information, we have not been able to reproduce the bug. The problem may be with the import data file not having enough columns per row to match the table columns.

          Show
          Mamta A. Satoor added a comment - With the given information, we have not been able to reproduce the bug. The problem may be with the import data file not having enough columns per row to match the table columns.
          Hide
          Rick Hillegas added a comment -

          Closing this issue as "not reproducible". Knut has suggested a likely cause for this problem, but without more information we can't be sure. The issue can be re-opened if more information becomes available.

          Show
          Rick Hillegas added a comment - Closing this issue as "not reproducible". Knut has suggested a likely cause for this problem, but without more information we can't be sure. The issue can be re-opened if more information becomes available.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ranjit Aneesh
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development