Question : Load date without timestamp in oracle date column using SQL*Loader?

I am having  the below table:
CREATE TABLE VSINGH.ETS_INF_PS_EMP_PUBLIC
(
  EMPE_SSN            NUMBER(15),
  EMPE_FIRST_NAME     VARCHAR2(50 BYTE),
  EMPE_MIDDLE_NAME    VARCHAR2(50 BYTE),
  EMPE_LAST_NAME      VARCHAR2(50 BYTE),
  EMPE_ID             VARCHAR2(50 BYTE),
  POSITION_NBR        VARCHAR2(50 BYTE),
  DEPT_ID             VARCHAR2(50 BYTE),
  DEPT_DESC           VARCHAR2(50 BYTE),
  SUPERVISOR_POS_NBR  VARCHAR2(50 BYTE),
 ORG_HIRE_DT         DATE,
  HIRE_DATE           DATE,
  TERMINATION_DATE    DATE,
  ST_LONGEVITY_DATE   DATE,
  JOB_CLASS_NBR       VARCHAR2(50 BYTE),
  JOB_CLASS_DESC      VARCHAR2(50 BYTE),
  EMPE_BUSINESS_PH    VARCHAR2(50 BYTE),
  EDUCATION_LVL       VARCHAR2(50 BYTE)
);

I am using SQL*Loader to load the data into the table
In the control file, I mentioned that field as :
ORG_HIRE_DT         date "MM/DD/YYYY",


I get an error in the log file which says:
Record 1: Rejected - Error on table ETS_INF_PS_EMP_PUBLIC, column ORG_HIRE_DT.
ORA-01830: date format picture ends before converting entire input string


Here is my control file and I have attached the .txt file in an attachment.

OPTIONS(SKIP=1, DIRECT=TRUE, ERRORS = 500000)
UNRECOVERABLE
LOAD DATA
INFILE          'C:\sql_loader\ETS_informix2\ets_inf_ps_emp_public.txt'
BADFILE         'C:\sql_loader\ETS_informix2\ets_inf_ps_emp_public.bad'
DISCARDFILE     'C:\sql_loader\ETS_informix2\ets_inf_ps_emp_public.dsc'
TRUNCATE
INTO TABLE ets_inf_ps_emp_public
FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(
  EMPE_SSN            char,
  EMPE_FIRST_NAME     char,
  EMPE_MIDDLE_NAME    char,
  EMPE_LAST_NAME      char,
  EMPE_ID             char,
  POSITION_NBR        char,
  DEPT_ID             char,
  DEPT_DESC           char,
  SUPERVISOR_POS_NBR  char,
  ORG_HIRE_DT         date "MM/DD/YYYY",
  HIRE_DATE           date "MM/DD/YYYY",
  TERMINATION_DATE    date "MM/DD/YYYY",
  ST_LONGEVITY_DATE   date "MM/DD/YYYY",
  JOB_CLASS_NBR       char,
  JOB_CLASS_DESC      char,
  EMPE_BUSINESS_PH    char,
  EDUCATION_LVL       char
)

Please could anyone help me in this matter.
Attachments:
 
 

Answer : Load date without timestamp in oracle date column using SQL*Loader?


ORG_HIRE_DT  "to_date(ORG_HIRE_DT, 'MM/DD/YYYY')"
Random Solutions  
 
programming4us programming4us