Re: SQL*Loader default field value

From: RAMESH <ubsram_at_pacific.net.sg>
Date: 1 May 1998 16:19:13 GMT
Message-ID: <01bd751d$18e7fcc0$469a15a5_at_bengy123>


You can use the DECODE function available in Oracle Loader to solve your problem. This can replace your NULL value with space or whatever you want. If you want the exact syntax than you have to wait till I go to office tomorrow.

See ya

ubsram_at_pacific.net.sg is my e-mail address.

markjo_at_cwcinc.com wrote in article <6ia9j7$sr5$1_at_nnrp1.dejanews.com>...
> I have a table in an Oracle 8 database that has three fields that make up
the
> primary key. I am loading it with the following control file:
>
> LOAD DATA
> INFILE 'PARTDESCRIPTIONs.txt'REPLACE
> INTO TABLE PART_NUMBER_DESCRIPTIONS
> ( PART_DESCRIPTION POSITION( 1: 30),
> ITEM_CODE POSITION( 31: 42),
> PART_TYPE POSITION( 43: 43)
> )
>
> The problem is the Part_Type field could have just a space in it but the
> loader takes it as a NULL and throws the record out because the field
cannot
> be NULL.
>
> There was a reply to another message about using :nvl(my field name, ' ')
in
> the field description but I haven't found a syntax it likes.
>
> Any help would be greatly appreciated.
>
> Thanks in advance.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
Received on Fri May 01 1998 - 18:19:13 CEST

Original text of this message