954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem in using Oracle Sqlloader!

LOAD DATA
	INFILE 'F:\DataMining\dvdlist.csv'
	DISCARDFILE 'F:\Datamining\Discard\dvdlist.dis'
INTO TABLE dvdlist
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS(
	DVD_Title char,
	Studio char,
	Released date "DD-MM-YYYY" NULLIF Released=BLANKS,
	Status char,
	Sound decimal external,
	Versions char,
	Price char,
	Rating char,
	Years char,
	Genre char,
	Aspect char,
	UPC integer external,
	DVD_ReleaseDate date "DD-MM-YYYY" NULLIF DVD_RealeaseDate=BLANKS,
	ID  integer external,
	Timestamp date "DD-MM-YYYY"
)
CREATE TABLE dvdlist(
	DVD_Title varchar2(100) not null,
	Studio varchar(40) not null,
	Released date default sysdate,
	Status char(20),
	Sound decimal,
	Versions varchar2(20),
	Price char(10) not null,
	Rating varchar2(10),
	Years char(4) default 'UNK',
	Genre char(10),
	Aspect varchar2(10),
	UPC integer,
	DVD_ReleaseDate date default sysdate,
	ID integer,
	Time_stamp date default sysdate
);


I have attached the csv file that I want to load.
I am having problem in loading Date formats in the csv file and the format that Oracle accepts.
And what should I do for long integers in the ctl integers ??
:?:

Please help!
Thanks!

Attachments dvdlist.zip (1535.71KB)
apanimesh061
Junior Poster
176 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

Better to load the dates as string and convert later.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

Post: Markdown Syntax: Formatting Help
You