Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL*Loader Control File Syntax

SQL*Loader Control File Syntax

From: News <lesley_at_vimich.com>
Date: Fri, 4 Feb 2000 17:06:14 -0500
Message-ID: <87ficq0anq@enews3.newsguy.com>


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 IF




Received on Fri Feb 04 2000 - 16:06:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US