Home » RDBMS Server » Server Utilities » SQL Loader: problem loading csv file with extra commas (SQL*LDR, Oracle 10g)
SQL Loader: problem loading csv file with extra commas [message #318454] Tue, 06 May 2008 21:47 Go to next message
pbdougl
Messages: 2
Registered: May 2008
Junior Member
Hi; I have a csv file extracted out of a foreign database with a text field at the end that contains commas. I want to load all columns except this last text field into Oracle using sqlldr but keep getting errors.

Data example:
Header:
Account,Assigned,LatestNote
Data:
748004546,1/08/2007,DO NOT BILL
712345745,1/10/2007,OK, EXCEPT CUST UPSET


From the above example, I only want to load columns Account & Assigned because if I load them all the comma in line2 obviously creates problems.

Pls help me.
PD

Re: SQL Loader: problem loading csv file with extra commas [message #318513 is a reply to message #318454] Wed, 07 May 2008 01:30 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
but keep getting errors.

Unfortunately, it is you who knows which errors. We have no idea because noone is sitting behind your back and watching what's going on on the screen.

So, try to post all relevant information about the problem (Oracle database version, control file you wrote, copy and paste error you got, etc.).
Re: SQL Loader: problem loading csv file with extra commas [message #319339 is a reply to message #318454] Fri, 09 May 2008 22:43 Go to previous messageGo to next message
TheSingerman
Messages: 49
Registered: April 2008
Location: Brighton, Michigan
Member
I'll take a guess, and state that you don't have a real .csv file. You have something that looks a lot like a .csv file, but it isn't a real one. A real one would get picked up by a spreadsheet application without any problem, and yours won't.

The last line in A Real .csv File would look like this:

 "712345745","1/10/2007","OK, EXCEPT CUST UPSET"


So recreate your .csv file with quotes as field terminators, modify your control file, and you should have no problem.
Re: SQL Loader: problem loading csv file with extra commas [message #319400 is a reply to message #318454] Sat, 10 May 2008 10:13 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8636
Registered: November 2002
Location: California, USA
Senior Member
pbdougl wrote on Tue, 06 May 2008 19:47

I only want to load columns Account & Assigned



So, just load those two columns. If they are the only two that you specify in your SQL*Loader control file, then they are the only two that get loaded. Don't list the other column that you don't want in the control file.


Re: SQL Loader: problem loading csv file with extra commas [message #319487 is a reply to message #319339] Sun, 11 May 2008 21:05 Go to previous message
pbdougl
Messages: 2
Registered: May 2008
Junior Member
Hi All; Thx for your input. I managed to fix it late last week by accident while I was trying to give Littlefoot some more info. I got the FILLER field sorted out. Serendipity!

P
Previous Topic: sql loader error invalid number
Next Topic: import database error
Goto Forum:
  


Current Time: Sat Dec 10 08:46:52 CST 2016

Total time taken to generate the page: 0.10894 seconds