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 -> Re: NEED HELP WITH NULLIF using sqlloader

Re: NEED HELP WITH NULLIF using sqlloader

From: Kathinka Diehl <kathinka_at_rrr.de>
Date: Mon, 29 Nov 1999 14:11:00 +0100
Message-ID: <81tub9$25ka2$1@fu-berlin.de>

Greg Hayes <hayford_at_hayford.demon.co.uk> schrieb:

>

> "5 rows successfully loaded."
> "1 row not loaded because all fields were null."

Your statement works fine. But Oracle don't insert a row with _all_ fields are NULL.

Try this one:

create table testdates
(tdate date,
 field varchar2(1));

and

load data
infile yourfile.dat
replace
into table testdates
 (tdate position(1:6) char nullif(1:6)='000000'... (your statement),   field position(1:1))

You wil see:

tdate F

----------- -
01-JAN-99   9
02-OCT-99   9
            0

04-NOV-99 9
...

HTH, Kathinka Received on Mon Nov 29 1999 - 07:11:00 CST

Original text of this message

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