Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Use the bulk loader to perform "within-database" inserts
In article <c48a8333.0205131914.1adda26a_at_posting.google.com>,
dino1_at_ms1.hinet.net says...
>
>Dear all,
>
>In Kimbal's DW Lifecycle book pp. 622-623, he tells to use the bulk
>loader to perform "within-database" inserts:
>QueryProgram &username &password <extract_query.sql | \
>LoaderProgram load_script.ctl &username &password
>
>In my Oracle 8.1.7 for Windows 2K case, it's:
>sqlplus username/password_at_db @extract_query.sql
>sqlldr username/password_at_db data=extract_query.txt
>control=load_sth.ctl
>because sqlldr.exe doesn't take input data from stdin, so a data file
>has to be created in the first query with spool, this writing might
>add additional time to Kimbal's original idea.
>
>Generally speaking, do you think bulk loader is the best way to do
>this? Anyone comes with a better idea? Please also reply to
><dino1_at_ms1.hinet.net>, thanks a lot.
that seems like a really hard way to do:
insert into t select ....;
in a single database. If you want direct path mode
insert /*+ append */ into t select ....
(read the concepts guide on direct mode inserts for more details on append)
>
>Regards,
>Dino
-- Thomas Kyte (tkyte@oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Tue May 14 2002 - 05:18:03 CDT