ITPub博客

首页 > Linux操作系统 > Linux操作系统 > infile * 不能和str属性连用

infile * 不能和str属性连用

原创 Linux操作系统 作者:perfychi 时间:2012-10-30 16:38:38 0 删除 编辑
[oracle@yitai ~]$ sqlplus scott/oracle

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 30 14:19:09 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> desc test;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 VARCHAR2(10)
 AGE                                                VARCHAR2(10)
 USERNAME                                           VARCHAR2(10)

[oracle@yitai ~]$ vi test.ctl

load data
infile *   "str x'2a2a0a'"
truncate into table test
fields terminated by ','
(
id ,
age  ,
username
)
1,24,Jack**
2,25,Tom**
3,26,Jane**


[oracle@yitai ~]$ sqlldr scott/oracle control=test.ctl

SQL*Loader: Release 10.2.0.4.0 - Production on Tue Oct 30 14:19:50 2012

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

SQL*Loader-283: file processing string "str x'2a2a0a'" ignored for INFILE *
SQL*Loader-350: Syntax error at line 10.
Expecting keyword INTO or keyword BEGINDATA, found "1".
1,24,Jack**
^

根据测试结果:控制文件test.ctl里infile * 不能和str属性连用。

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

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

注册时间:2012-06-06

  • 博文量
    484
  • 访问量
    2976213