sqlloader to escape | delimiter

Posted on 2012-09-04
Last Modified: 2012-09-06
I've a feed delimited by | (pipe) character.. when the data contains | sqlloader puts those records in error. I try to escape the | with \| and use REGEXP_REPLACE(job_role,'[\\][\\]|','|') when inserting the column it fails too..

any other ideas?

Job_Role "REGEXP_REPLACE(job_role,'[\\][\\]|','|')",
Question by:ram_0218
    LVL 76

    Expert Comment

    by:slightwv (䄆 Netminder)
    Please post some sample data and expected results.
    LVL 2

    Accepted Solution

    Instead of quoting with "\" enclose fields containing "|" with quotes and use clause:
    FIELDs TERMINATED BY '|' optionally enclosed by "'" 

    Open in new window


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now