Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Question Unanswered: Error code '-964' while importing

    Hi all,

    DB2 8.1.5 on Windows 2000

    I tried exporting data from one table (succesful) and importing it into another. The reason i did not do a copy is that, i do not need certain columns (deprecated). Column sizes and datatypes are same. It failed the import with Error '964'. Can anybody tell me what that might be due to?

    Error:

    SQL3306N An SQL error "-964" occurred while inserting a row into
    the table.

    Thanks in advance,
    Newbie
    Last edited by dsusendran; 05-18-04 at 17:06.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    We need to know the DDL for the two tables and the EXPORT and IMPORT statements that you are executing.

    Andy

  3. #3
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Post Ddl's

    ******** SOURCE TABLE DDL *****************

    -- DDL Statements for table "DBO "."CALSCHED"

    CREATE TABLE "DBO "."CALSCHED" (
    "SCHUNQUE" VARCHAR(20) NOT NULL ,
    "OPPORTUNITY_ID" VARCHAR(15) ,
    "METHOD_ACT_ID" VARCHAR(20) ,
    "LIT_ORD_LIST_KEY" VARCHAR(20) ,
    "SCHOPT" VARCHAR(1) ,
    "SCHSTART" TIMESTAMP ,
    "SCHEND" TIMESTAMP ,
    "SCHTYPE" VARCHAR(30) ,
    "SCHREF" VARCHAR(250) ,
    "SCHSTATUS" VARCHAR(2) ,
    "SCHBY" VARCHAR(20) ,
    "SCHFOR" VARCHAR(20) ,
    "SCHPRIOTY" VARCHAR(1) ,
    "SCHREF1" VARCHAR(20) ,
    "SCHALARM" CHAR(1) ,
    "SCHRING" TIMESTAMP ,
    "SCHDONE" TIMESTAMP ,
    "SCHNOTES" VARCHAR(2000) ,
    "SCHPRIVATE" CHAR(1) ,
    "SCHALARMPAGE" VARCHAR(50) ,
    "SCHALARMFLAG" CHAR(1) ,
    "MAPI_ID" VARCHAR(255) ,
    "DATASTORE" VARCHAR(64) ,
    "MAPI_DT" TIMESTAMP ,
    "CREATED_BY" VARCHAR(20) NOT NULL ,
    "CREATED_DT" TIMESTAMP NOT NULL ,
    "UPDATED_BY" VARCHAR(20) NOT NULL ,
    "UPDATED_DT" TIMESTAMP NOT NULL ,
    "SOURCE_CODE" VARCHAR(4) ,
    "SCHGROUP" VARCHAR(20) ,
    "INV_PLAN_ID" VARCHAR(20) ,
    "CAMPAIGN_ID" VARCHAR(20) ,
    "ENTITY_ID" VARCHAR(20) ,
    "MAPI_GROUP_ID" VARCHAR(255) ,
    "CSTM_OLD_SCHREF2" VARCHAR(40) ,
    "CSTM_OLD_SCHTYPE" VARCHAR(15) ,
    "CSTM_SCHACTIV_TIME" INTEGER )
    IN "USERSPACE1" ;

    - DDL Statements for indexes on Table "DBO"."CALSCHED"

    CREATE INDEX "DBO "."BIDX_CS_SCHSTATUS" ON "DBO "."CALSCHED"
    ("SCHSTATUS" ASC);

    -- DDL Statements for indexes on Table "DBO "."CALSCHED"

    CREATE INDEX "DBO "."BIDX_CS_SCHTYPE" ON "DBO "."CALSCHED"
    ("SCHTYPE" ASC);

    -- DDL Statements for indexes on Table "DBO "."CALSCHED"

    CREATE INDEX "DBO "."IDX_CS__ALARM" ON "DBO "."CALSCHED"
    ("SCHRING" ASC,
    "SCHALARMFLAG" ASC);

    -- DDL Statements for indexes on Table "DBO "."CALSCHED"

    CREATE INDEX "DBO "."IDX_CS_SCHFOR" ON "DBO "."CALSCHED"
    ("SCHFOR" ASC);

    -- DDL Statements for indexes on Table "DBO "."CALSCHED"

    CREATE INDEX "DBO "."IDX_CS_SCHSTART" ON "DBO "."CALSCHED"
    ("SCHSTART" ASC);

    -- DDL Statements for indexes on Table "DBO "."CALSCHED"

    CREATE INDEX "DBO "."IX_A10__GROUP_ID" ON "DBO "."CALSCHED"
    ("SCHGROUP" ASC);


    -- DDL Statements for primary key on Table "DBO "."CALSCHED"

    ALTER TABLE "DBO "."CALSCHED"
    ADD PRIMARY KEY
    ("SCHUNQUE");

    ******** TARGET TABLE DDL *****************

    - DDL Statements for table "DPS "."ACTIVITY"
    CREATE TABLE "DPS ."ACTIVITY" (
    "ACTIVITY_ID" VARCHAR(20) NOT NULL ,
    "CREATED_BY" VARCHAR(20) NOT NULL ,
    "CREATED_DT" TIMESTAMP NOT NULL ,
    "UPDATED_BY" VARCHAR(20) NOT NULL ,
    "UPDATED_DT" TIMESTAMP NOT NULL ,
    "START_DT" TIMESTAMP ,
    "END_DT" TIMESTAMP ,
    "ACTIVITY_TYPE_ID" VARCHAR(20) ,
    "SUBJECT" VARCHAR(200) ,
    "STATUS" VARCHAR(20) ,
    "PRIORITY" VARCHAR(20) ,
    "CLOSED_DT" TIMESTAMP ,
    "NOTES" VARCHAR(2000) ,
    "PRIVATE" CHAR(1) ,
    "SOURCE_ACTIVITY" VARCHAR(20) ,
    "ALARM" TIMESTAMP )
    IN "USERSPACE1" ;

    -- DDL Statements for primary key on Table "DPS "."ACTIVITY"

    ALTER TABLE "DPS "."ACTIVITY"
    ADD CONSTRAINT "PK_ACT" PRIMARY KEY
    ("ACTIVITY_ID");

    *********** Mapping of columns *********************
    *** These are only columns i extracted data from

    SCHUNQUE --- ACTIVITY_ID
    CREATED_BY --- CREATED_BY
    CREATED_DT --- CREATED_DT
    UPDATED_BY --- UPDATED_BY
    UPDATED_DT --- UPDATED_DT
    SCHSTART --- START_DT
    SCHEND --- END_DT
    SCHTYPE --- ACTIVITY_TYPE_ID
    SCHREF --- SUBJECT
    SCHSTATUS --- STATUS
    SCHPRIOTY --- PRIORITY
    SCHDONE --- CLOSED_DT
    SCHNOTES --- NOTES
    SCHPRIVATE --- PRIVATE
    SOURCE_CODE --- SOURCE_ACTIVITY
    UPDATED_DT --- ALARM

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    If the two tables are in the same database, then you do not need Export/Import to move the data. It can be done with a single SQL Insert statement.

    INSERT INTO DPS.ACTIVITY SELECT SCHUNQUE,CREATED_BY,CREATED_DT, UPDATED_BY,UPDATED_DT,SCHSTART,SCHEND,SCHTYPE,SCHR EF,
    SCHSTATUS,SCHPRIOTY,SCHDONE,SCHNOTES,SCHPRIVATE,SO URCE_CODE,
    UPDATED_DT FROM DBO.CALSCHED

    If they are in different DBs, then you Export woild look like:
    EXPORT to myfile.ixf of IXF messages myfile.exm SELECT SCHUNQUE,CREATED_BY,CREATED_DT, UPDATED_BY,UPDATED_DT,SCHSTART,SCHEND,SCHTYPE,SCHR EF,
    SCHSTATUS,SCHPRIOTY,SCHDONE,SCHNOTES,SCHPRIVATE,SO URCE_CODE,
    UPDATED_DT FROM DBO.CALSCHED

    The import would be:
    IMPORT from myfile.ixf of IXF COMMITCOUNT 10 MESSAGES myfile.imm INSERT INTO DPS.ACTIVITY

    HTH

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •