January 28, 2010 at 2:55 am
Hi,
I am struggling to extract data correctly from CSV file. The commas on a column is causing the data to extract incorrectly.
How can I get round this problem?
Please help.
Many Thanks.
January 28, 2010 at 3:08 am
Provide some sample data please.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
January 28, 2010 at 3:14 am
Thanks for your response.
I am trying to import data from Company Name column in CSV file that contains commas in the value.
E.g. Company name could be = Orange, Plc
When I try to import the above example it splits and treats it as two separate values?
Please help
January 28, 2010 at 3:21 am
Obviously no program can reliably tell the different between an content comma and a field separating comma.
The csv needs to be exported correctly , either use fixed lengths or a text identifier ie "
January 28, 2010 at 3:26 am
Is there a delimiter (eg "") around company name? Or is it just
Field1, co, name, here, field2
Field1, another company name here, field3
?
If there is no field delimiter, you are snookered.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
January 28, 2010 at 3:33 am
Ok so for example I have the below column with values:
Company Name
Orange, Plc
Vodafone
O2, Plc
If I extract the above, Orange, Plc and O2, Plc values with commas will be treated as two separate values and Plc will move to the next cell/ column.
Do I need to have double quotes round my values like below:
Company Name
"Orange, Plc"
"Vodafone"
"O2, Plc"
Is that what u meant?
January 28, 2010 at 3:47 am
Yup , exactly that , be careful that you filter out an quotes within the data as you will get the same issue.
January 28, 2010 at 3:47 am
Yes
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
January 28, 2010 at 4:07 am
If I put double quotes around my values. I'm get double double quotes when I review the data.
Eg: When I have value "Orange, Plc" when I preview this in flat file source I get ""Orange Plc"" in the next column?
What am I doing wrong?
January 28, 2010 at 4:28 am
1) Have you set the "Text Qualifier" in the Connection manager to " ?
2) Does the data look ok when opened with notepad ?
January 28, 2010 at 4:33 am
Hi,
Yes I did work out it was the text qualifier that I didn't set.
Thank you so much for all your help.
Much appreciated.
Many Thanks.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply