RE: SQL*Loader Question

From: Le, Binh T. <Binh.Le_at_lfg.com>
Date: Tue, 20 Jun 2017 19:10:50 +0000
Message-ID: <BL2PR08MB468A2B8A0E90333C8DF0DC6F2C50_at_BL2PR08MB468.namprd08.prod.outlook.com>



This would work for me --- note that you have space between ...

optionally_enclosed_by=\'\"\'

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Scott Canaan Sent: Tuesday, June 20, 2017 1:58 PM
To: oracle-l_at_freelists.org
Subject: SQL*Loader Question

***This email is from an external source. Only open links and attachments from a Trusted Sender.*** I am trying to load a CSV file into Oracle 12.1.0.2 using SQL*loader. I've never run into an issue like the one I'm having now. The fields are all variable length and comma-delimited. If the field has commas in it, then it is enclosed in quotes. All looks good. In the CTL file, I start with:

load data
infile 'Advance2015.05_2017.csv'
badfile 'Advance2015.bad'
replace
into table advance.rit_matching_policy_2015 fields terminated by ',' optionally enclosed by '"' trailing nullcols

Then list the columns. Near the end is a very long column (comment1) which is defined as varchar2(3000) in the database. SQL*Loader will load all of the rows fine, except those that have quotes around the comment1 field. I can't figure out how to get it to load those rows and why it's having trouble with the quotes ("). I'm sure it's something really simple, but I just can't see it.

Thank you,

Scott Canaan '88 (srcdco_at_rit.edu<mailto:srcdco_at_rit.edu>)

(585) 475-7886 - work                (585) 339-8659 - cell
"Life is like a sewer, what you get out of it depends on what you put into it." - Tom Lehrer

Notice of Confidentiality: **This E-mail and any of its attachments may contain Lincoln National Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Lincoln National Corporation family of companies. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout. Thank You.**

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 20 2017 - 21:10:50 CEST

Original text of this message