We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,240 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Problem in using Oracle Sqlloader!

<prjt.ctl>

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"
)

<dvdlist Table>

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)
3
Contributors
1
Reply
3 Months
Discussion Span
11 Months Ago
Last Updated
2
Views
apanimesh061
Posting Whiz in Training
216 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Better to load the dates as string and convert later.

debasisdas
Posting Genius
6,968 posts since Feb 2007
Reputation Points: 722
Solved Threads: 457
Skill Endorsements: 20

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0557 seconds using 2.63MB