Microsoft
Software
Hardware
Network
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_PUBL
IC
(
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_informi
x2\ets_inf
_ps_emp_pu
blic.txt'
BADFILE 'C:\sql_loader\ETS_informi
x2\ets_inf
_ps_emp_pu
blic.bad'
DISCARDFILE 'C:\sql_loader\ETS_informi
x2\ets_inf
_ps_emp_pu
blic.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:
ets-inf-ps-emp-public.txt
(1.5 MB)
(File Type Details)
data file
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
Cannot enable infopath in sharepoint 2010
Applying group sum to higher level
That's not contempt. THIS is contempt
How to activate the insertitemtemplate of a formview
Exchnage database restoration
Crystal Reports for Visual Studio 2010
Citrix presentation Svr 4.5 - Data collector election
The following recipient(s) cannot be reached
Hide local user folders on Server 2008 desktop
Exchange 2010 installed but not accessible from OWA