ITPub博客

首页 > Linux操作系统 > Linux操作系统 > sqlloader_3指定不装载哪一项

sqlloader_3指定不装载哪一项

原创 Linux操作系统 作者:stevexuan 时间:2012-08-12 09:22:18 0 删除 编辑

Sql*load 3

(一)环境:一个数据库、一个需要装载的展开文件、一个描述展开文件的控制文件

C:\Documents and Settings\Administrator>sqlplus scott/tiger

SQL*Plus: Release 9.0.1.0.1 - Production on 星期六 8月 4 12:10:55 2012

(c) Copyright 2001 Oracle Corporation.  All rights reserved.

连接到:

Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production

With the Partitioning option

JServer Release 9.0.1.1.1 – Production

表格

SQL> desc zp_2

 名称                                      是否为空? 类型

DEPTNO                                             NUMBER(2)

 DNAME                                              CHAR(14)

 LOC                                                CHAR(13)

SQL> select * from zp_2;

未选定行

(二)编辑控制文件:

E:\zp\sqlload>notepad ulcase1.ctl

LOAD DATA 

INFILE * 

INTO TABLE zp_2

REPLACE 

FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'  

( DEPTNO, 

FILLER_1 FILLER, // 下面的 "Something Not To Be Loaded" 将不会被装载 

DNAME, 

LOC 

) 

BEGINDATA 

20,Something Not To Be Loaded,Accounting,"Virginia,USA"  

(三)运行

E:\zp\sqlload>sqlldr userid=scott/tiger control=ulcase1.ctl log=ulcase3.log;

SQL*Loader: Release 9.0.1.1.1 - Production on 星期六 8月 4 12:31:35 2012

 (c) Copyright 2001 Oracle Corporation.  All rights reserved.

达到提交点,逻辑记录计数2

(四)结果显示

SQL> select * from zp_2;

 

    DEPTNO DNAME          LOC

---------- -------------- -------------

        20 Accounting     Virginia,USA

(五)说明

FILLER_1 FILLER, // 下面的 "Something Not To Be Loaded" 将不会被装载 

FILLER_1为自定义名,filer指一下内容不会被装载

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/27151369/viewspace-740749/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-08-12

  • 博文量
    17
  • 访问量
    19225