Home » RDBMS Server » Server Utilities » SQL Loader Comma delimiter issue (oracle 11g )
SQL Loader Comma delimiter issue [message #536715] Thu, 22 December 2011 06:12 Go to next message
sri_rao85
Messages: 25
Registered: September 2006
Junior Member
Hi ,

I am using sqlloader for loading the data into database by using csv file.My csv file is delimited by comma in that i am having a column which is having the , and line feeds targeted to load into a long data type.for example as bellow
descri,dfdfdfd,dfdfdf,
sdfsdf,

dfsdfd,

i want to move this column data into a single table column.But due to because of delimited "," it is splitting into number of columns

Thanks,
Srinivas
Re: SQL Loader Comma delimiter issue [message #536716 is a reply to message #536715] Thu, 22 December 2011 06:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you do not say to SQL*Loader you a comma as delimiter it does not split the value.
If comma is not the delimiter of fields then do not tell to SQL*Loader it is the delimiter.

Regards
Michel
Re: SQL Loader Comma delimiter issue [message #536722 is a reply to message #536716] Thu, 22 December 2011 06:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
My csv file is delimited by comma in that i am having a column which is having the , and line feeds targeted to load into a long data type

How could SQL*Loader knows a comma is a separator between 2 values or part of a single value?
If you can say that with words then you can do it in SQL*Loader.
The usual way is to enclose the value containing comma between a character that is not part of the value, " for instance.

Regards
Michel
Re: SQL Loader Comma delimiter issue [message #536733 is a reply to message #536722] Thu, 22 December 2011 06:56 Go to previous messageGo to next message
sri_rao85
Messages: 25
Registered: September 2006
Junior Member
Hi Michel ,
I understand your words,But only one column which is the remarks one is having such issue.Is there any way to handle it.

Thanks,
Srinivas
Re: SQL Loader Comma delimiter issue [message #536737 is a reply to message #536733] Thu, 22 December 2011 07:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I said what you can do and what you can't.
If I give you (with comma as a delimiter):
kjhkjh,ljljlk,edz,oioiu,cffss
Can you tell me what are the values?

Regards
Michel
Re: SQL Loader Comma delimiter issue [message #536741 is a reply to message #536737] Thu, 22 December 2011 07:17 Go to previous messageGo to next message
sri_rao85
Messages: 25
Registered: September 2006
Junior Member
OPTIONALLY ENCLOSED BY '"' will handle that part there is no issue,But now my problem is just want to handle the linefeed.

Thanks,
Srinivas
Re: SQL Loader Comma delimiter issue [message #536744 is a reply to message #536741] Thu, 22 December 2011 07:38 Go to previous message
flyboy
Messages: 1903
Registered: November 2006
Senior Member
sri_rao85 wrote on Thu, 22 December 2011 14:17
But now my problem is just want to handle the linefeed.

Again, how will you decide whether it is the continuing column value or the new row? Or does the file contain only one row?
You may have a look at CONCATENATE/CONTINUEIF clauses: http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_control_file.htm#i1005509

[Edit: missing question mark]

[Updated on: Thu, 22 December 2011 07:39]

Report message to a moderator

Previous Topic: EXP/IMP scripts
Next Topic: Questions on data pump
Goto Forum:
  


Current Time: Thu Mar 28 16:13:29 CDT 2024