Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL*Loader Control File Syntax
Hello everyone! I'm new to Oracle and I'm in the middle of transferring our
data from DataEase into Oracle 8i using SQL*Loader. I want to enter a 1
where INVCUST='yes' and a 0 where INVCUST='no'.
I'm having trouble with the proper syntax. I've included a little example
of one way I've tried and it's not working for me. Would anyone be able to
tell me what I'm doing wrong?
Thanks!
Lesley
FBEImp.ctl ........
Load Data
INFILE 'fbe.txt' "var"
BADFILE 'fbe.bad'
DISCARDFILE 'fbe.dsc'
INSERT INTO TABLE frghtbill
fields terminated by '~' optionally enclosed by " "
TRAILING NULLCOLS
(
....
FIELDS
INVCUST iif(INVCUST='yes',1,0),
FIELDS
....
terminated by whitespace)
I've also tried
INVCUST IF INVCUST='yes' THEN
INVCUST=1; ELSE INVCUST=0; END IFReceived on Fri Feb 04 2000 - 16:06:14 CST