8 Replies Latest reply on Apr 30, 2012 12:16 PM by CloudDB

    Sql loader - loading data into database problem

    user8744860
      Hi,

      I am facing problem in loading data using ctl file and a data file into oracle db.

      The table I am entering has the following structure:

      CREATE TABLE "ENRCO07"."TEST"
      (
      "NAME" VARCHAR2(50 BYTE),
      "MOD_DATE" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL ENABLE
      )     

      My ctl file has structure as:

      OPTIONS (DIRECT=FALSE, ERRORS=1000)
      LOAD DATA
      APPEND
      INTO TABLE TEST
      truncate
      FIELDS TERMINATED BY ";"
      TRAILING NULLCOLS
      (
      NAME,
      MOD_DATE DATE 'YYYYMMDDHH24MISS'

      )

      I tried a lot with MOD_DATE format since it was showing the error null cannot be inserted and other errors were also encountered.

      My problem statement is :
      I want the default date as current_timestamp in the format "'YYYYMMDDHH24MISS" else the date that comes from the data file to be loaded into oracle db.
      I can't alter the DDL only ctl can be altered to get to the solution.


      I am new to this , kindly help.

      Thanks

      Abhinav