FAQ
Hallo you DBA's:

How can I write a script in ctl-file if I want to import a textfile. I want to use the
command decode because I want to replace the character '?' with a 0 (zero), which is a
number field inthe database.
How can I do this. I want to do it while the sqlldrscript is running.

Sincerely

Roland Sköldblom

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Roland.Skoldblom_at_ica.se

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).

Search Discussions

  • Diana_Duncan_at_ttpartners.com at May 22, 2001 at 12:40 pm
    Example of a SQL*Load control file to load a file, skipping the first line,
    replacing the data in the table, with comma-separated, double-quote
    enclosed data, using the decode function on one of the columns.

    OPTIONS (SKIP=1)

    LOAD DATA

    INFILE "data.dat"
    INTO TABLE mytable REPLACE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'

    (
    REC_TYPE char,
    VCID char,
    SHIP_TO_ID char "decode(:SHIP_TO_ID, '?', '0')"
    )

    Maybe this is what you're looking for?

    Diana Duncan
    TITAN Technology Partners
    One Copley Parkway, Ste 540
    Morrisville, NC 27560
    VM: 919.466.7337 x 316
    F: 919.466.7427
    E: Diana_Duncan_at_ttpartners.com

    Roland.Skoldb

    lom_at_ica.se To: Multiple recipients of list ORACLE-L

    Sent by: cc:

    root_at_fatcity. Fax to:

    com Subject: sqlldr to_number

    05/22/2001

    03:00 AM

    Please

    respond to

    ORACLE-L

    Hallo you DBA's:

    How can I write a script in ctl-file if I want to import a textfile. I want
    to use the command decode because I want to replace the character '?' with
    a 0 (zero), which is a number field inthe database.
    How can I do this. I want to do it while the sqlldrscript is running.

    Sincerely

    Roland Sköldblom

    --
    Please see the official ORACLE-L FAQ: http://www.orafaq.com
    --
    Author:
    INET: Roland.Skoldblom_at_ica.se

    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:
    INET: Diana_Duncan_at_ttpartners.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).

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedMay 22, '01 at 6:00a
activeMay 22, '01 at 12:40p
posts2
users2
websiteoracle.com

People

Translate

site design / logo © 2023 Grokbase