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: Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de>
Date: Thu, 09 Dec 1999 04:36:38 +0200
Message-ID: <384F15B6.EC18C94D@0800-einwahl.de>


Nice trick.

"trailing nullcols" should also work (before the opening parenthesis after "insert into" line).

Martin

Kathinka Diehl wrote:
>
> 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 Wed Dec 08 1999 - 20:36:38 CST

Original text of this message

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