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

Home -> Community -> Usenet -> c.d.o.server -> Re: Text-file

Re: Text-file

From: Terry Dykstra <dontreply_tddykstra_at_forestoil.ca>
Date: Thu, 28 Nov 2002 21:50:22 GMT
Message-ID: <ycwF9.15044$fk5.1228781@news0.telusplanet.net>


From the sql manual:

CREATE TABLE emp_external (

   employee_id NUMBER(6),

   last_name      VARCHAR2(20),
   email          VARCHAR2(25),
   hire_date      DATE,
   job_id         VARCHAR2(10),
   salary         NUMBER(8,2)

)

ORGANIZATION EXTERNAL
(TYPE oracle_loader
 DEFAULT DIRECTORY admin
 ACCESS PARAMETERS
 (
  RECORDS DELIMITED BY newline
  BADFILE 'ulcase1.bad'
  DISCARDFILE 'ulcase1.dis'
  LOGFILE 'ulcase1.log'
  SKIP 20
  FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'   (
   deptno     INTEGER EXTERNAL,
   dname      CHAR,
   loc        CHAR

  )
 )
 LOCATION ('ulcase1.dat')
)

REJECT LIMIT UNLIMITED;
--
Terry Dykstra
Canadian Forest Oil Ltd.
"s Lehaire" <s.lehaire_at_meilleuregestion.com> wrote in message
news:as5h8l$b9r$1_at_reader1.imaginet.fr...
>
> "s Lehaire" <s.lehaire_at_meilleuregestion.com> a écrit dans le message de
> news: as55kv$78a$1_at_reader1.imaginet.fr...
> > Hi,
> > I know that is possible to write into a file the resultset of a query
with
> > the spool option.
> > but is it possible to read a text file to put the data into a table ?
> > Thx for response
> > ++
> >
> >
>
> Ok I found a solution but i've got a probleme:
> I found the UTL_FILE package but I can't read my file because oracle is
not
> authorized to acces thie directory
> so I must add this directory in the init.ora file config but I don't know
> how to do.
> please help =)
>
>
Received on Thu Nov 28 2002 - 15:50:22 CST

Original text of this message

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