Page 1 of 1

Help in Reading a File

Posted: Mon Aug 22, 2011 1:16 am
by mac4rfree85
Hi Guys,

I have an issue in reading a file.
File is a Comma Delimited File with Quotes on Data.

But the issue is some Data in one of the column is having " (1") and comma.

Code: Select all

"PENCIL GRIPS, 5PK      ",
"Econ VW Binder White 1"  ",
I need to insert the data as it is to the Target Database.

Can somebody help me as how to read it without losing the Quotes as well as comma.

Cheers!!!!

Posted: Mon Aug 22, 2011 2:22 am
by ray.wurlod
Your file is breaking the rules. If strings are delimited by double-quote, they can't contain double-quote. Get the provider of the file to get it right - either use a different delimiter character (or none), or double the internal double-quote.

Code: Select all

"Econ binder (white, 1"") "

Posted: Mon Aug 22, 2011 6:49 am
by mac4rfree85
ray.wurlod wrote:Your file is breaking the rules. If strings are delimited by double-quote, they can't contain double-quote. Get the provider of the file to get it right - either use a different delimiter character ...
Ray, there is a option in the Columns tab of the Sequentail stage "Contains Terminators". I have changed it to contain Yes. Even then we will not be able to read it?

What does this column(option) does. Can you shed some light on this.

and Thanks for your help :)

Posted: Mon Aug 22, 2011 6:54 am
by chulett
Record terminators, like a line-feed in the middle of your data.

Posted: Tue Aug 23, 2011 11:50 am
by mac4rfree85
chulett wrote:Record terminators, like a line-feed in the middle of your data.
Yeah thanks for the information.. On further analysis found that the file is fixed length even though it contain comma as delimiter.
So processed it as Fixed length file itself..

Thanks for the information though. :)