How to ignore the title of the first row of an oracle External table?

Source: Internet
Author: User
Tags dname

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.