How to ignore the title of the first row of an oracle External table?
Article from the csdn blog Oracle bug, if reproduced please indicate the source: http://blog.csdn.net/yfleng2002/article/details/47104723
Introduction
When an oracle External table references a csv or other txt file, you often want to skip the title of the first line. In fact, when creating an oracle External table, you can useSkip 1The specific syntax is as follows.
Note: In the following code, skip 20 indicates that the first 20 rows are ignored. You can also change the value to any integer based on your needs. Generally, the title of the second row is ignored.
CREATE TABLE dept_external ( deptno NUMBER(6), dname VARCHAR2(20), loc VARCHAR2(25) )ORGANIZATION EXTERNAL(TYPE oracle_loader DEFAULT DIRECTORY admin ACCESS PARAMETERS ( RECORDS DELIMITED BY newline BADFILE 'ulcase1.bad' DISCARDFILE 'ulcase1.dis' LOGFILE 'ulcase1.log' SKIP 20 FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' ( deptno INTEGER EXTERNAL(6), dname CHAR(20), loc CHAR(25) ) ) LOCATION ('ulcase1.ctl'))REJECT LIMIT UNLIMITED;
Official documents: http://docs.oracle.com/cd/E11882_01/server.112/e22490/et_params.htm
Skips the specified number of records in the data file before loading. SKIP can be specified only when nonparallel access is being made to the data.
Translation: The SKIP option specifies the number of lines ignored when loading data files. Note that the skip option can only be used in non-parallel access.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.