Oracle::–How to import xls File to Oracle DataBase? |
and now i ll show you How to import xls File to Oracle DataBase? step by setp.
Here it’s :
1. You need to exp your .xls to .csv with save as your xls fileand change file type be comes CSV(text csv)
with Filed options :
*Character Set Unicode (UTF-8)and then OK and click save
*Filed delimited ,
*and Text delimited “
open your .csv file with your text editor till U get data like this below :
“0061031″,”Mr”,”B”,”A”,”Williams A”2.Create a new file with your text editor and copas scripts below :
“0061032″,”Mr”,”B”,”A”,”Williams B”
“0061033″,”Mr”,”B”,”A”,”Williams C”
and on
explanation
LOAD DATAthis is mine
INFILE name.csv –>your csv path
APPEND
INTO TABLE RE.contacts –>your table name on your DB
FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ –>your column name on your table
(
URN,
TITLE,
FIRST_NAME,
OTHER_NAME,
LAST_NAME
)
LOAD DATAsave and named file with name.ctl
INFILE name.csv
APPEND
INTO TABLE RE.contacts
FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘
(
URN,
TITLE,
FIRST_NAME,
OTHER_NAME,
LAST_NAME
)
3.Run your name.ctl on Terminal with :
sqlldr userid=user/pass control=name.ctlyou re finish now . . . good luck!