Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: better sql code

Re: better sql code

From: Jared Still <jkstill_at_gmail.com>
Date: Wed, 26 Oct 2005 22:43:01 -0700
Message-ID: <bf46380510262243x56c1e33cy350c2bdd765452eb@mail.gmail.com>


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-l
Received on Thu Oct 27 2005 - 00:45:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US