Ctl file doubts [message #349139] |
Fri, 19 September 2008 01:40 |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
> cat ace2_smerf_sven_kdm.ctl
OPTIONS(SKIP=1)
LOAD DATA
INFILE '/home/x.dat'
BADFILE '/home/x.bad'
DISCARDFILE '/homex.dsc'
INSERT INTO TABLE X
FIELDS TERMINATED BY "~"
TRAILING NULLCOLS
(<column list>)
This is a ctl file in production.Please clarify my doubts
the above ctl file is run as below in production?How correct it is?
sqlldr $leninlogin control=${CTL_DIR}/x.ctl log=${LOGS_DIR}/x.log errors = 200000 direct=true
What will the OPTIONS(SKIP=1) do?
secondly i have one more ctl file below.what exactly is the difference between the two and which one can be prefered for usage?
how to make the first ctl file as a truncate load one?
Please clarify if my understanding right?
LOAD DATA
infile '$HOME/download/y.dat'
TRUNCATE
INTO TABLE Y
FIELDS TERMINATED BY "~"
TRAILING NULLCOLS
(<another column list]
)
[EDITED by MC: changed names as per 'Reported Message' request]
[EDITED by LF: removed column list from the CTL file as per 'Reported Message' request]
[Updated on: Tue, 25 November 2008 02:29] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Ctl file doubts [message #349505 is a reply to message #349497] |
Mon, 22 September 2008 01:58 |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
INSERT INTO TABLE Y
FIELDS TERMINATED BY "~"
ok thanks for the info.
whether this part of the code correct in writing a ctl file?
[EDITED by MC: changed names as per 'Reported Message' request]
[Updated on: Thu, 20 November 2008 01:07] by Moderator Report message to a moderator
|
|
|