Home » RDBMS Server » Server Utilities » SQL Loader DATE Datatype error (merged)
SQL Loader DATE Datatype error (merged) [message #418890] Wed, 19 August 2009 01:37 Go to next message
cresmet
Messages: 1
Registered: August 2009
Junior Member
Hi,

I am having a problem while loading data from flat file to oracle. The flat file contains date and time in a single field and I want to insert that value into a column in oracle of DATE datatype.

LOAD DATA
INFILE *
INTO TABLE CNTRL_DUAL
APPEND
FIELDS TERMINATED BY ',' TRAILING NULLCOLS
(
PK INTEGER,
TS DATE "YYYY-MM-DD" TERMINATED BY ',',
ORDER_MONTH6 CHAR,
COUNTRY CHAR,
MONTH_END_DATE CHAR,
UPDATEDBY CHAR,
)
BEGINDATA
3,2004-08-12 10:35:06.447,199910,CI,19991102,NULL

CREATE TABLE CNTRL_DUAL
(
PK NUMBER(19) NOT NULL,
TS DATE,
ORDER_MONTH6 VARCHAR2(6 BYTE) NOT NULL,
COUNTRY VARCHAR2(4 BYTE) NOT NULL,
MONTH_END_DATE VARCHAR2(8 BYTE) NOT NULL,
UPDATEDBY VARCHAR2(16 BYTE)
);

I am facing problems with TS column.

Any help will be appreciated.

[Updated on: Wed, 19 August 2009 02:25] by Moderator

Report message to a moderator

Re: SQL Loader DATE Datatype error [message #418895 is a reply to message #418890] Wed, 19 August 2009 01:51 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Why do you use the date format YYYY-MM-DD if you claim the field also contains a time-element
Re: SQL Loader DATE Datatype error [message #418905 is a reply to message #418890] Wed, 19 August 2009 02:23 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do NOT crosspost your question.

Regards
Michel
Previous Topic: Loading data into database using SQL Loader
Next Topic: Export with DML/Modification
Goto Forum:
  


Current Time: Wed Dec 07 18:50:39 CST 2016

Total time taken to generate the page: 0.18886 seconds