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: SQL Loader question

Re: SQL Loader question

From: Jason Judge <jason.judge_at_virgin.net>
Date: Mon, 1 Nov 1999 22:46:04 -0000
Message-ID: <7vl4hu$6fb$1@nclient13-gui.server.virgin.net>


The sample you have given does not contain a NULL - it contains the text 'null'. Is column 'b' a number or a very short (<4 chars) string? To translate this use a decode statement in you SQL*loader control section:

...
fields terminated by ',' optionally enclosed by '"' (

    id,
    b "decode(UPPER(:b), 'NULL', NULL, :b)",     c
)
begindata
1,null,'c'
...

<david_petit_at_yahoo.com> wrote in message news:7vffr9$uqp$1_at_nnrp1.deja.com...
> I am a beginner of using SQL loader. I have a problem in using loader.
> I have a control file as follows:
>
> load data
> infile *
> append
> into table testing
> fields terminated by ',' optionally enclosed by '"'
> (id,b,c)
> begindata
> 1,null,'c'
> 2,3,'c'
> ..
>
> Loading has error due to the NULL value. How can I handle the NULL
> value in the control file? Moreover, how can I handle the NULL value if
> the NULL value appears at the end of the line?
>
> Thanks,
> David
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Nov 01 1999 - 16:46:04 CST

Original text of this message

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