troubleshooting Question

VS C# Strings with quote help

Avatar of rwheeler23
rwheeler23Flag for United States of America asked on
12 Comments1 Solution279 ViewsLast Modified:
I have a troublesome text file I am trying to import into SQL using SSIS. I may try to write a VS C# application to correct the fields before I insert them in to SQL but here is the problem.

"The rain in Spain stays mainly in the "Plains"" or
"The rain in Spain stays mainly in the "Plains" instead of just
"The rain in Spain stays mainly in the Plains"

Out of 50,000 + lines there are about 100 where the number of quotation marks is messing up the import. Can anyone point to some code or provide hints as to how I can insure that every string field starts and ends with a quotation mark and has no other quotation marks in between the beginning and the end?
Dmitry G
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros