CREATE TABLE sales_ext(
product_id NUMBER(6),
sale_date DATE,
store_id NUMBER(8),
quantity_sold NUMBER(8),
unit_cost NUMBER(10,2),
unit_price NUMBER(10,2))
ORGANIZATION EXTERNAL (
TYPE ORACLE LOADER
DEFAULT DIRECTORY ext_data_dir
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
BADFILE log_file_dir:'sales.bad_xt'
LOGFILE log_file_dir:'sales.log_xt'
FIELDS TERMINATED BY "|" LDRTRIM
MISSING FIELD VALUES ARE NULL)
LOCATION ('sales.data'))
REJECT LIMIT UNLIMITED;
--