Source :
-- Tablename.sh
sqlldr userid=id/password
control=./control/TABLE_NAME.ctl
log=./log/TABLE_NAME_$1.log
bad=./bad/TABLE_NAME_$1.bad
discard=./bad/TABLE_NAME_$1.dsc
data=./data/TABLE_NAME_$1.dat
-- TABLE_NAME.ctl
oad data
append
into table TABLE_NAME
fields terminated ','
trailing nullcols
(
RES_NO,
NAME,
TEL
)
-- TABLE_NAME_20021017.dat
주민번호,이름,전화번호
123456-234567,홍길동,011-111-1111
123456-234567,홍길동,011-111-1111
123456-234567,홍길동,011-111-1111
123456-234567,홍길동,011-111-1111
123456-234567,홍길동,011-111-1111
실행 :
% ./Tablename.sh 20021017
Posted by 홍반장