Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Importing data into existing table
A copy of this was sent to "John N" <jn14624_at_erols.com>
(if that email address didn't require changing)
On Tue, 12 Oct 1999 08:19:40 -0700, you wrote:
>Any hint on a script that will help me import comma delimited files
>into my table?
>
>Thanks for all your great help!
>John N
>
>
sqlldr is the tool you want.
It can be as easy as:
LOAD DATA
INFILE *
INTO TABLE dept
REPLACE
FIELDS TERMINATED BY '|'
(
deptno
,dname
,loc
)
BEGINDATA
10|ACCOUNTING|NEW YORK 20|RESEARCH|DALLAS 30|SALES|RESTON 40|OPERATIONS|BOSTON
(replace the "|" with a ","). The data does not have to be in the same file as the 'control file' stuff at the top does (use infile somefilename.dat to specify where the input comes from). Then just run sqlldr user/pass controlfilename.ctl to load the data.
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Oct 12 1999 - 08:18:34 CDT
![]() |
![]() |