External table ORA-30657: operation not supported on external organized tab
Hi all,
I try to create an external table and fill it with data out of my DB. Without the AS - Section everything is fine. The external table will be created but I don't get the data into it. Is there any possible way to write delimited data into a flat-file via external table or an other mechanism?
Regards Carsten
The full statement:
CREATE OR REPLACE DIRECTORY admin_dat_dir
AS 'E:\CDDTEST';
CREATE OR REPLACE DIRECTORY admin_log_dir
AS 'E:\CDDTEST';
CREATE OR REPLACE DIRECTORY admin_bad_dir
AS 'E:\CDDTEST';
DROP TABLE cdd_ext_vt;
-- create the external table
CREATE TABLE cdd_ext_vt
(vertrag_nr VARCHAR2(25),
kunden_name VARCHAR2(60)
)
ORGANIZATION EXTERNAL
(
TYPE ORACLE_LOADER
DEFAULT DIRECTORY admin_dat_dir
ACCESS PARAMETERS
(
records delimited by newline
badfile admin_bad_dir:'empxt%a_%p.bad'
logfile admin_log_dir:'empxt%a_%p.log'
fields terminated by ','
missing field values are null
( vetrag_nr, kunden_name
)
)
LOCATION ('cdd_ext_vt.dat')
)
REJECT LIMIT UNLIMITED
AS
select vt.vertrag,chr(34)||trim(person.name)||chr(34)
from vt,person
where vt.syskd = person.sysperson
and rownum < 11
;