Friday, February 10, 2012

Comma delimited errors

I need to import comma delimited text files into sql tables. in one of the column, there is a comma in the string itself. e.g.

Cust_ID Name Phone Address1 Address2

Date that I have:

001,juia, anderson,4694568855,,Cedar Spring

The data does not have double quote as text qualifiers. but as you see, on the Name column, there is a comma, which is not a delimiter. can anybody give any suggestions on how i can deal with that? i would appreciate it so much.

thanksWink

Jul wrote:

I need to import comma delimited text files into sql tables. in one of the column, there is a comma in the string itself. e.g.

Cust_ID Name Phone Address1 Address2

Date that I have:

001,juia, anderson,4694568855,,Cedar Spring

The data does not have double quote as text qualifiers. but as you see, on the Name column, there is a comma, which is not a delimiter. can anybody give any suggestions on how i can deal with that? i would appreciate it so much.

thanks

If the data has embedded commas, but does not have a text qualifier, I fail to see how you can clean this up. Sorry.

Either fix the format of the file by using text qualifiers, or chose a different delimiter. Tabs, semicolons, etc...|||

Phil,

Thanks for the reply. That's what I thought too..Was just wondering if anybody has ever dealt and solved this problem.

Thanks.

No comments:

Post a Comment