Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL*Loader help

Re: SQL*Loader help

From: Ron Rogers <RROGERS_at_galottery.org>
Date: Fri, 30 Mar 2001 13:46:05 -0800
Message-ID: <F001.002DD782.20010330124527@fatcity.com>

Chaim,
 If on the other hand the BLANK will not work properly on a numeric filed that is to be used in calculations. In that case you might want to have a 0(zero) loaded rather than a null,blank. Then you could use the NVL clause in your controll statement where the field type is numeric.
ROR mm

>>> dbarbour_at_nucentrix.net 03/30/01 02:00PM >>> Chaim,

Check out the sqlldr case studies on OTN. Ross has the right idea with the NULLIF. Here's a general description from OTN:

        Loading All-Blank Fields

Totally blank fields for numeric or DATE fields cause the record to be rejected. To load one of these fields as null, use the NULLIF clause with the BLANKS keyword, as described in Comparing Fields to BLANKS. Case 6: Loading Using the Direct Path Load Method provides examples of how to load all-blank fields as null with the NULLIF clause.

If an all-blank CHAR field is surrounded by enclosure delimiters, then the blanks within the enclosures are loaded. Otherwise, the field is loaded as null. More details on whitespace are presented in Trimming Blanks and Tabs and in Preserving Whitespace.

Hope this helps.

David A. Barbour
Oracle DBA, OCP
Chaim.Katz_at_Completions.Bombardier.com wrote:
>
> Maybe some could help me.
> I'm having trouble trying to load a csv file with sqlldr. The destination table
> has char columns defined as not null and the csv file has missing data for these
> columns. (These columns will contain blanks in the database).
>
> Sqlldr wants to set the missing fields to null, which results in record
> rejected errors. Is there a way around this. I would be happy if I could insert
> blanks or insert any other marker-value into the field like '***'..
> The input file lines looks something like (01110,,,,1,1,31460)
> Thanks
> Chaim
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
> INET: Chaim.Katz_at_Completions.Bombardier.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com 
-- 
Author: David A. Barbour
  INET: dbarbour_at_nucentrix.net 

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Ron Rogers
  INET: RROGERS_at_galottery.org

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Mar 30 2001 - 15:46:05 CST

Original text of this message

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