Oracle SQL*Loader菴ソ逕ィ譁ケ豕

SQL*Loader縺ィ縺ッシ

螟夜Κ繝輔ぃ繧、繝ォ(CSV遲)縺ョ繝繝シ繧ソ繧丹racleDatabase蜿悶j霎シ繧Oracle讓呎コ悶ヤ繝シ繝ォ

螳溯。後さ繝槭Φ繝

sqlldr
繝ヲ繝シ繧カ繝シ蜷/繝代せ繝ッ繝シ繝院DB
control='蛻カ蠕。繝輔ぃ繧、繝ォ蜷'
log='繝ュ繧ー蜃コ蜉帛'
rows=繧ウ繝溘ャ繝亥腰菴
errors=繧ィ繝ゥ繝シ險ア螳ケ謨ー
skip=繧ケ繧ュ繝繝嶺サカ謨ー


sqlldr user/pass@test control='tbl.ctl' log='log.log' rows=1000 errors=-1 skip=3

蛻カ蠕。繝輔ぃ繧、繝ォ

OPTIONS (
繝繧、繝ャ繧ッ繝医Δ繝シ繝峨〒繝ュ繝シ繝(繝舌ャ繝輔ぃ譛ェ菴ソ逕ィシ晞ォ倬)
縲DIRECT=TRUE
)

LOAD DATA

繧ュ繝」繝ゥ繧ッ繧ソ繧サ繝繝亥錐(蜈・蜉帙ヵ繧。繧、繝ォ縺ョ貍「蟄励さ繝シ繝)
CHARACTERSET ス

LENGTH SEMANTICS CHAR

蜈・蜉帙ヵ繧。繧、繝ォ繝代せ
INFILE 'ス.ctl'

INSERT/APPEND/TRUNCATE/REPLACE
TRUNCATE

繝ュ繝シ繝牙ッセ雎。陦ィ
INTO TABLE 繧ケ繧ュ繝シ繝.陦ィ

蛹コ蛻繧頑枚蟄(INFILE縺靴SV縺ョ蝣エ蜷)
FIELDS TERMINATED BY ','

INFILE縺ォ蝗イ縺ソ險伜捷縺ゅj縺ョ蝣エ蜷
OPTIONALLY ENCLOSED BY '"'

譚。莉カ縺ォ蜷郁エ縺吶k繝繝シ繧ソ縺ョ縺ソ繝ュ繝シ繝峨☆繧句エ蜷
WHEN (蛻怜錐1 = 'a' AND 蛻怜錐2 = 'B')

蜿悶j霎シ縺ソ蟇セ雎。蛻
TRAILING NULLCOLS
(
縲蛻怜錐1,
縲蛻怜錐2,
縲蛻怜錐3,
縲ス
)


窶サtbl.ctl
OPTIONS (
縲DIRECT=TRUE
)
LOAD DATA
CHARACTERSET JA16SJISTILDE
LENGTH SEMANTICS CHAR
INFILE '蜈・蜉帙ヵ繧。繧、繝ォ繝代せ'
TRUNCATE
INTO TABLE TEST.TABLE1
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
WHEN (蛻怜錐1 = 'a' AND 蛻怜錐2 = 'B')
TRAILING NULLCOLS
(
縲蛻怜錐1,
縲蛻怜錐2,
縲蛻怜錐3
)

Follow me!

蜑阪ョ險倅コ

Oracle SQL*Plus菴ソ逕ィ譁ケ豕