Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: better sql code
As someone has pointed out to me, if you can access the data
with an external table, why not just use a single SQL statement
to update the table.
That would make a lot of sense now, wouldn't it?
Jared (red-faced :)
On 10/25/05, Jared Still <jkstill_at_gmail.com> wrote:
>
> Comments inline:
>
> create an external table and a test table
> drop table loadtest;
>
> create table loadtest(
> filename varchar2(50)
> )
> organization external
> (
> type oracle_loader
> default directory forall_dir
> access parameters
> (
> records delimited by newline
> badfile 'loadtest.bad'
> discardfile 'loadtest.dis'
> logfile 'loadtest.log'
> fields terminated by "," optionally enclosed by '"'
> (
> filename char
> )
> )
> location ('loadtest.txt')
> )
> reject limit unlimited
> /
>
> ...
>
>
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-lReceived on Thu Oct 27 2005 - 00:45:08 CDT