By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Import .xls file into oracle

P: 2
Hi This is kapil,

I wanna import a excel file into my data base, i am using the oracle 9i. And PL/SQL as a front end. Would anybody can help me out.
May 24 '07 #1
Share this Question
Share on Google+
2 Replies


frozenmist
Expert 100+
P: 179
Hi Kapil,
If its a csv file try this

LOAD DATA
INFILE '<location of file>'
APPEND
INTO TABLE <table_name>
FIELDS TERMINATED BY "<delimiter>"

I havent tried out .xls files. But can you try using UTL_FILE and SQL Loader

Hope u get the solution
Cheers
May 26 '07 #2

frozenmist
Expert 100+
P: 179
Hi Kapil,
write this code in a .ctl (control) file.
LOAD DATA
INFILE '<location of file>'
APPEND
INTO TABLE <table_name>
FIELDS TERMINATED BY '<delimiter>'
optionally enclosed by'"'
trailing nullcols
(
<column names>
)


Then go to SQLLDR prompt.
Give command:
Sqlldr userid=<user_name@hoststring/password> control='path of the control file'
[log='path of the log file' errors=<number upto which the error can be allowed>,skip=<if the header is first line put 1, otherwise omit this option> ]

Try this out
Cheers.
May 28 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.