Skip to Main Content
  • Questions
  • Importing data from .xls file into oracle tables

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Sudhir.

Asked: February 22, 2007 - 12:38 am UTC

Last updated: February 22, 2007 - 9:20 am UTC

Version: 10.2.0

Viewed 1000+ times

You Asked

Hi Tom!!!

Tom, can u please tell me how to import data from .xls file into oracle tables.I have searched a lot but I could not find good information.

this is my code,

create table ext_table (
claim_id varchar2(255),
rdf_file_name varchar2(200),
time_stamp varchar2(200),
asc_number varchar2(200),
woid varchar2(200),
sender_country varchar2(10),
date_received varchar2(200),
date_shipped varchar2(200),
date_purchased varchar2(200),
symptom_code varchar2(200),
fault_code varchar2(200),
product varchar2(200),
product_code varchar2(200),
product_code_name varchar2(200),
pay_to_party_number varchar2(200),
claim_status_name varchar2(200),
payment_proposal_number varchar2(200)
)
organization external (
type oracle_loader
default directory reddy
access parameters (
records delimited by newline
logfile 'ar.log'
badfile 'ar.txt'
fields terminated by ','
missing field values are null
)
location('ar.xls')
)
REJECT LIMIT unlimited;


after executing this I am getting ascii characters in table.


So please tell me with a example if possible.

Thank u,



L.Sudhir Reddy

and Tom said...

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206#18830681837358


XLS is a proprietary binary file format, you won't be using sqlldr or external tables on it - unless you save it as a CSV file.

Is this answer out of date? If it is, please let us know via a Comment