Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Load a textfile
Roland,
SQL*Loader can do this, you will need to create a control file specifying FIELDS TERMINATED BY ';' and the fields you would like to import - something like:
----copy to .ctl file in notepad-----
LOAD DATA
INFILE 'path/to/your/file/file_name.txt' <------------ Your text file
[INSERT]/[APPEND] INTO TABLE {USER}.{TABLE}
FIELDS TERMINATED BY ';'
(FIELD1 DATATYPE,
FIELD2 DATATYPE)
The syntax for SQL*Loader is something like:
C:\sqlldr username/password control='path/to/your/controlfile'
This is in REALLY basic form, for more options and to learn about using SQL*Loader consult the Oracle Utilities Manual available at your local technet website :)
Cheers
Mark
-----Original Message-----
Roland.Skoldblom_at_ica.se
Sent: Tuesday, May 15, 2001 10:15
To: Multiple recipients of list ORACLE-L
Hallo,
How can I load a textfile into the database, the text file is
semicolonseparated and I only need to impor two fields inthe database and
not all records of thoss
fields.
Give me an example please
Roland Sköldblom
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Roland.Skoldblom_at_ica.se Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Tue May 15 2001 - 09:27:01 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mark Leith INET: mark_at_cool-tools.co.uk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).