Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Bulk insert question
Fredrik Wahlgren wrote:
>Hi
>
>I have a server application in which I need to insert lots of rows into a
>table. In SQL Server I use the BULK INSERT command. It looks like this
>
>BULK INSERT MyUser.[MyTable] FROM 'C:\MyFile.txt' WITH (FIELDTERMINATOR =
>'|',ROWTERMINATOR = '\r\n')
>¨
>This is much faster than having to do lots of INSERT statments. How can I do
>something similar in Oracle? I understand I can start SQL loader and have it
>do the insert but that seems rather complicated. Surely there must be a
>better way, right?
>
>My application is written in C++ and I use ADO. Would I be better off using
>OCI?
>
>Thanks in advance,
>Fredrik
>
>
>
Bulk inserts are available in Oracle in numerous places but to think
that anything in C++ is easier than SQL*Loader is amazing. Truly
amazing. SQL*Loader is so easy to use I write complete inserts off the
top of my head in seconds, occassionally it takes as much as three to
five minutes with large numbers of fields into multiple tables.
I'd suggest that if you want to work with Oracle you put down your C compiler and learn some Oracle. Familiarity breeds ease of use.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Mon Sep 15 2003 - 20:04:06 CDT