Using Oracle 11g Release 2
Here is my create external table statement:
CREATE TABLE global.ext_a_attrib_cmt
( tag VARCHAR2(255)
, from$ VARCHAR2(255)
, to$ VARCHAR2(255)
)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DATA_DIR
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
SKIP 1
BADFILE EXT_BAD_DIR:'a_attrib_cmt.bad'
LOGFILE EXT_LOG_DIR:'a_attrib_cmt.log'
-- FIELDS TERMINATED BY 0X'09' -- TAB delimited
FIELDS TERMINATED BY '\t'
OPTIONALLY ENCLOSED BY "'"
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
)
LOCATION ('a_attrib_cmt.txt')
)
REJECT LIMIT UNLIMITED
NOMONITORING
/
Here is the text file, a_attrib_cmt.txt:
| tag | from | to |
| FrontSpringType_id | Coil | w/FRONT COIL SPRINGS |
| FrontSpringType_id | Leaf | w/FRONT LEAF SPRINGS |
| Aspiration_id | Naturally Aspirated | w/o TURBO |
| Aspiration_id | Turbocharged | w/TURBO |
| Aspiration_id | Supercharged | w/SUPERCHARGER |
| SteeringType_id | Rack | w/RACK & PINION STEERING |
| SteeringType_id | Gear | w/GEAR STEERING |
| FuelDeliveryType_id | CARB | w/o FUEL INJ |
| FuelDeliveryType_id | FI | w/FUEL INJ |
| BedLength_id | | ?" BED |
| BodyNumDoors_id | | ? DR |
| BrakeSystem_id | | w/? BRAKES |
| FrontBrakeType_id | | w/FRONT ? BRAKES |
PUBLIC has read/write privs on the directory EXT_DATA_DIR.
Here is the error I'm getting:
globall@ORA1> select count(*) from ext_a_attrib_cmt;
select count(*) from ext_a_attrib_cmt
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "minussign": expecting one of: "badfile, byteordermark, characterset, column, data, delimited, discardfile,
disable_directory_link_check, fields, fixed, load, logfile, language, nodiscardfile, nobadfile, nologfile, date_cache, preprocessor, readsize, string, skip,
territory, variable"
KUP-01007: at line 5 column 8