Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: create table External Table (ORA9I) problem!
In article <6c5a24c8.0208240723.16cd153c_at_posting.google.com>, mawf_at_asiainfo.com
says...
>
>i have found a demo doc details as below:
>External Table Example
>The following statement creates an external table that represents a
>subset
>of the sample hr.employees table. The opaque_format_spec is shown in
>italics.
>Please refer to Oracle9i Database Utilities for information on the
>ORACLE_LOADER
>access driver and how to specify values for the opaque_format_spec.
>
>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;
>
>---------------------------
>when i run the script , it pops a error msg just like 'cound not
>found DEFAULT DIRECTORY admin',so why ?
you did not create a directory ADMIN
create directory admin using '/tmp/';
for example..... It doesn't know what admin is
>and i am confused for those below:
> (
> deptno INTEGER EXTERNAL,
> dname CHAR,
> loc CHAR
> )
>what does this mean ?
>
>thanks a lot!
means deptno is a number and dname/loc are char (defaulted to 255) strings in the datafile. check out the sqlldr docs for full details.
-- 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 Sat Aug 24 2002 - 19:29:28 CDT