In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Oracle Sqlldr optionally enclosed by(GCH)
In all, when you edit the control file,you would rather add theclause "optionally enclosed by" inensurance.
The following example is that not use the clause "optionallyenclosed by".As follows, never use the clause "optionally enclosed by"in the control file.
OPTIONS(skip=1)
LOADDATA
INFILE"/home/oracle/sqlldr/MB_PERFORMANCE_TD_CELL.csv"
APPENDINTO TABLE MB_PERFORMANCE_TD_CELL
Fieldsterminated by ","
trailingnullcols
(EVENT_DAYtimestamp "yyyy-mm-dd hh34:mi:ss",
HOUR_P,
CITY_NAME,
COUNTRY_NAME,
VENDOR,
CELL_NAME,
CGI,
RLC_THRPUT ,
UTRAN1_NUM,
UTRAN2_NUM ,
RECORD_TIME"to_timestamp(to_char(sysdate,'yyyymmdd hh34:mi:ss'),'yyyymmddhh34:mi:ss')",
VERSION_ID constant "3"
)
Next import data
[oracle@daidaisqlldr]$ sqlldr daidai/love8013control=MB_PERFORMANCE_TD_CELL.CTL
SQL*Loader:Release 11.2.0.4.0 - Production on Tue Jun 14 22:35:52 2016
Copyright(c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commitpoint reached - logical record count 64
Commitpoint reached - logical record count 128
Commitpoint reached - logical record count 192
Commitpoint reached - logical record count 256
Commitpoint reached - logical record count 320
Commitpoint reached - logical record count 384
Commitpoint reached - logical record count 448
Commitpoint reached - logical record count 512
Commitpoint reached - logical record count 576
Commitpoint reached - logical record count 640
Commitpoint reached - logical record count 704
Commitpoint reached - logical record count 768
Commitpoint reached - logical record count 832
Commitpoint reached - logical record count 896
Commitpoint reached - logical record count 960
Commitpoint reached - logical record count 1024
DiagnoseScan import log
……
Record96: Rejected - Error on table MB_PERFORMANCE_TD_CELL, column UTRAN2_NUM.
ORA-01722:invalid number
Record119: Rejected - Error on table MB_PERFORMANCE_TD_CELL, column UTRAN2_NUM.
ORA-01722:invalid number
Record126: Rejected - Error on table MB_PERFORMANCE_TD_CELL, column UTRAN2_NUM.
ORA-01722:invalid number
…….
From the import log, it is the conclusionthat some were imported successfully. I select from database. Samples are asfollows:
Therefore, the columns in the control filecorrespond to th
e columns of goal table. However, there were still a fewrecords that were not imported into table.
Scan bad record.
[oracle@daidaisqlldr]$ cat MB_PERFORMANCE_TD_CELL.bad
2016-06-0700:00:00,, Dazhou, Qu County, Huawei,SDZ6NR5: Quxian Yongxing_2,460 -00-61844-12098,,
2016-06-0700:00:00,, Neijiang, Neijiang ownership unknown, Huawei,SNJ6NR2DX: Tian Jia Shi Zhong_1,460-00-61811-34907,,
2016-06-0700:00:00,, Ziyang, Ziyang ownership unknown, Huawei,SZY6NR3: Lezhi Dafo Station 2_1,460-00-61889-40577,,
2016-06-0700:00:00,, Ziyang, Ziyang ownership unknown, Huawei,SZY4NR3: Lezhi Zhongliang Middle School_1,460 -00-61889-35687,,
2016-06-0700:00:00,, Neijiang, Neijiang ownership unknown, Huawei,SNJ5NR5WY: Chengbei_3,460 -00-61812-36239,,
2016-06-0700:00:00,, Dazhou, Xuanhan County, Huawei, SDZ6NR3: Xuanhan Puguang 105_1,460-00-61841-24707,,
2016-06-0700:00:00,, Dazhou, Qu County, Huawei,SDZ6NR5: Quxian Wangjiangting_1,460 -00-61844-60867,,
Then, I think of keyword 'optionallyenclosed by'.
Solve the proplem.Modify the control file.
cat MB_PERFORMANCE_TD_CELL.CTL
OPTIONS(skip=1)
LOAD DATA
INFILE"/home/oracle/sqlldr/MB_PERFORMANCE_TD_CELL.csv"
APPEND INTO TABLE MB_PERFORMANCE_TD_CELL
Fields terminated by "," optionlly enclosed by " "
trailing nullcols
(EVENT_DAY timestamp "yyyy-mm-ddhh34:mi:ss",
HOUR_P,
CITY_NAME,
COUNTRY_NAME,
VENDOR,
CELL_NAME,
CGI,
RLC_THRPUT ,
UTRAN1_NUM,
UTRAN2_NUM ,
RECORD_TIME"to_timestamp(to_char(sysdate,'yyyymmdd hh34:mi:ss'),'yyyymmddhh34:mi:ss')",
VERSION_ID constant "3"
)
Import data successfully.
SQL> select count(*) fromMB_PERFORMANCE_TD_CELL
2 ;
COUNT(*)
----------
50908
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.