Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2012
    Posts
    32

    Unanswered: DB2 loading data Error

    Hello,

    I am trying to load data in a DB2 table which has a default YEARDATE column with a value which i expect it to put automatically but it throws me error i attached the command line file to this post ?

    import from C:\DATA_IMRM\EMP_HC.ixf of ixf insert into db2inst1.AY_EMP_HC

    Code:
    CREATE TABLE "DB2INST1"."AY_EMP_HC" (
    		"ROW_ID" VARCHAR(50) NOT NULL, 
    		"EMP_NAME" VARCHAR(200), 
    		"EMP_TYPE" VARCHAR(50), 
    		"MANAGER" VARCHAR(200), 
    		"SERIAL_NUM" VARCHAR(20), 
    		"COUNTRY" VARCHAR(100), 
    		"REGION" VARCHAR(100), 
    		"GEO" VARCHAR(50), 
    		"CNTRY_TYPE" VARCHAR(50), 
    		"WORK_CITY" VARCHAR(100), 
    		"WORK_LOC" VARCHAR(150), 
    		"WORK_PLACE" VARCHAR(100), 
    		"MARKET" VARCHAR(20), 
    		"FUNC_VP" VARCHAR(200), 
    		"VICE_PRES" VARCHAR(200), 
    		"DIRECTOR" VARCHAR(200), 
    		"THIRD_LINE" VARCHAR(200), 
    		"SEC_LINE" VARCHAR(200), 
    		"DIRECT_REPORT" VARCHAR(200), 
    		"HRIWMONTH" DOUBLE, 
    		"NOTESID" VARCHAR(200), 
    		"FVPF" VARCHAR(150), 
    		"SKILLS" VARCHAR(200), 
    		"TAGS" VARCHAR(200), 
    		"DIVCY01" VARCHAR(100), 
    		"DIVCY02" VARCHAR(100), 
    		"DIVCY03" VARCHAR(100), 
    		"DIVCY04" VARCHAR(100), 
    		"DIVCY05" VARCHAR(100), 
    		"DIVCY06" VARCHAR(100), 
    		"DIVCY07" VARCHAR(100), 
    		"DIVCY08" VARCHAR(100), 
    		"DIVCY09" VARCHAR(100), 
    		"DIVCY10" VARCHAR(100), 
    		"DIVCY11" VARCHAR(100), 
    		"DIVCY12" VARCHAR(100), 
    		"HIRINGTICKETYEAR" VARCHAR(100), 
    		"HIRINGTICKETTYPE" VARCHAR(100), 
    		"HIRINGTICKETMARKET" VARCHAR(100), 
    		"HIRESTATUSPOSTING" VARCHAR(100), 
    		"HIRINGTICKETQ" VARCHAR(100),
    		"YEARDATE" DATE NOT NULL DEFAULT '2010-03-03'
    	)
    	DATA CAPTURE NONE 
    	PARTITION BY RANGE(YEARDATE NULLS LAST)
    	(PARTITION PART0 STARTING FROM ('2010-01-01')  ENDING AT ('2011-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART1 STARTING FROM ('2011-01-01')  ENDING AT ('2012-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART2 STARTING FROM ('2012-01-01')  ENDING AT ('2013-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART3 STARTING FROM ('2013-01-01')  ENDING AT ('2014-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART4 STARTING FROM ('2014-01-01')  ENDING AT ('2015-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART5 STARTING FROM ('2015-01-01')  ENDING AT ('2016-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART6 STARTING FROM ('2016-01-01')  ENDING AT ('2017-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART7 STARTING FROM ('2017-01-01')  ENDING AT ('2018-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART8 STARTING FROM ('2018-01-01')  ENDING AT ('2019-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART9 STARTING FROM ('2019-01-01')  ENDING AT ('2020-01-01') EXCLUSIVE  IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE, 
    	PARTITION PART10 STARTING FROM ('2020-01-01')  ENDING AT ('2020-12-31') IN IMRMLARGE INDEX IN IMRMLARGE LONG IN IMRMLARGE)
    	COMPRESS NO;
    
    ALTER TABLE "DB2INST1"."AY_EMP_HC" ADD CONSTRAINT "SQL120129092941420" PRIMARY KEY
    	("ROW_ID", "YEARDATE");
    Attached Thumbnails Attached Thumbnails Capture.PNG  

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Try specifying the target columns explicitly, listing only those that do exist in the input file:
    Code:
    import ... insert into AY_EMP_HC (row_id, ...)
    Missing columns should then be generated.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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