Having an issue with external tables in Oracle 11g. I'm currently using DB Artisan to run my query. The CREATE and ORGANIZATION code executes successfully, but when I run the select statement is where I am getting the error. My .csv file is set up the same way as the layout for the EXTERNAL_TABLE with the header as such.
CREATE TABLE EXTERNAL_TABLE
(
COL1 NUMBER(14),
COL2 VARCHAR2(10),
COL3 VARCHAR2(3),
COL4 VARCHAR2(3),
COL4 VARCHAR2(4),
COL6 NUMBER(4,0),
COL7 VARCHAR2(20),
COL8 VARCHAR2(20),
COL9 NUMBER(3)
)
ORGANIZATION EXTERNAL
(
TYPE ORACLE_LOADER
DEFAULT DIRECTORY FOLDER1
ACCESS PARAMETERS
(
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
(COL1 CHAR(14),
COL2 CHAR(10),
COL3 CHAR(3),
COL4 CHAR(3),
COL4 CHAR(4),
COL6 CHAR(4),
COL7 CHAR(20),
COL8 CHAR(20),
COL9 CHAR(3)
)
)
LOCATION ('FILENAME.csv') --Name of flat file.
)
REJECT LIMIT 0;
Running:
SELECT * FROM EXTERNAL_TABLE
gives this error:
ORA-29913:error in executing ODCIEXTTABLEOPEN callout ORA-29400:data cartridge error KUP-04027:file name check failed: A:\job\job\FILENAME_1234_5566.log