[20140426]使用sqlldr匯入.txt

lfree發表於2014-04-28

[20140426]使用sqlldr匯入.txt

.

SCOTT@test01p> @ver
BANNER                                                                               CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0

create table test
(a varchar2(20),
b varchar2(20),
c varchar2(20),
d varchar2(20));

D:\tmp>cat test.dat
cat test.dat
a,b,c,d
f,g,h,i
j,k,l,m

D:\tmp>sqlldr scott/btbtms@test01p table=test
sqlldr scott/btbtms@test01p table=test

SQL*Loader: Release 12.1.0.1.0 - Production on Sat Apr 26 20:00:20 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

Express Mode Load, Table: TEST
Path used:      External Table, DEGREE_OF_PARALLELISM=AUTO

Table TEST:
  3 Rows successfully loaded.

Check the log files:
  test.log
  test_%p.log_xt
for more information about the load.

SCOTT@test01p> select * from test;

A       B       C      D
------- ------- ------ ------
a       b       c      d
f       g       h      i
j       k       l      m

--並沒有看到它的問題,我猜測.他的機器設定了

SCOTT@test01p> column c noprint
SCOTT@test01p> select * from test;
A                    B                    D
-------------------- -------------------- --------------------
a                    b                    d
f                    g                    i
j                    k                    m

--而並不是什麼bug.
--不過這種簡單的匯入方式,我倒是值得我學習的.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1150647/,如需轉載,請註明出處,否則將追究法律責任。

相關文章