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 problem: Not loading Spaces into NULL column through direct load

Re: SQL*Loader problem: Not loading Spaces into NULL column through direct load

From: <rungr_at_my-deja.com>
Date: Tue, 18 Jan 2000 17:33:56 GMT
Message-ID: <862863$ffh$1@nnrp1.deja.com>


In article <85vkhg$iv3$1_at_nnrp1.deja.com>,   fatehahmad_at_hotmail.com wrote:
> Hi,
>
> I am using Oracle 8i. I am trying to load some data into a table by
> using SQL*Loader direct load option. One of the columns in that table
is
> NULL. When loader encounters a row which try to insert spaces into the
> NULL column, it rejects that row. I couldn't find out a solution that
> stops this behaviour.
>
> Thanks
>
> Fateh Ahmad
> fatehahmad_at_yahoo.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

In the SQL*Loader .ctl file:
for the column that should be NULL in the table: ...,decode(input_field,NULL,NULL,NULL),...

                        #1   #2   #3

decode looks at the input_field; if it is NULL (#1 in example), decode returns a NULL (#2 in example); if it is anything else, decode returns the default value, NULL (#3 in example). Good Luck!

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Jan 18 2000 - 11:33:56 CST

Original text of this message

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