hi,
i have created some sample data, and created the directory to point to the data source.
If my csv contains headings, as it is an export via sql developer from one of the tables, how can i include the headings from the csv to the external table.
CREATE TABLE emp_external
(
EMPNO NUMBER(4),
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4),
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2)
)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY emp_data
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
LOGFILE my_data:'data.log'
BADFILE my_data:'data.bad'
DISCARDFILE my_data:'data.disc'
fields terminated by ','
MISSING FIELD VALUES ARE NULL
)
LOCATION (my_data:'emp.csv')
);