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 question

SQL*Loader question

From: Zhao Fu <scip6125_at_leonis.nus.sg>
Date: 27 Jul 1998 10:27:39 GMT
Message-ID: <6phkmr$45$1@nuscc.nus.edu.sg>


I am using SQL*Loader to load a medical datafile into an Oracle table. The data format is like this:
"Robert","19540823","lung and liver","19970418","Dr.Smith",...

My control file is like this:

load data
infile 'somefile''
badfile 'dt.bad'
replace
into table old_sum
fields terminated by "," optionally enclosed by '"'

(NAME,
BIRTHDATE date 'YYYYMMDD',
CANCER SITE,
DEATHDATE date 'YYYYMMDD' ,
DOCTOR_NAME,
 ...
)

but there are a lot of missing data in the field DEATHDATE, the field is thus empty, so the above record might be like this:
"Robert","19540823","lung and liver","","Dr.Smith",...

So, I added NULLIF DEATHDATE=BLANKS into the control file, but those records with missing DEATHDATE still cannot be loaded. In addition, if a character field data is missing, using NULLIF clause still cannot replace the column into null, but they turn out to be blanks with the maximum length of this varchar2 column.

Anyone knows what's wrong with this?    

TIA Zhao Fu
School of computing
National Univeristy of Singapore
zhaofu_at_comp.nus.edu.sg  

-- Received on Mon Jul 27 1998 - 05:27:39 CDT

Original text of this message

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