Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Extra Commas in Flat File

Author  Topic 

nsingleton
Starting Member

1 Post

Posted - 2007-07-13 : 13:36:07
I am trying to create a SSIS package with a csv flat file for the both the destination and source. I cannot control the source file. I need to be able to handle an extra comma in the source file which occasionally contains suffixes i.e. {John, Smith, Jr,} which could cause some records to be 9 fields and others 10. Any ideas?

tmitch
Yak Posting Veteran

60 Posts

Posted - 2007-07-16 : 23:04:58
When you encounter an extra comma, is it enclosed in quotes or other delimiter? For example, most systems that export CSV file will do it in this fashion:

123456789,John,"Smith, JR",999/555-1234

If you have no such luck, you may be forced into using a script component to try to create an intelligent parser to pull out the data correctly.

hth
Tim
Go to Top of Page
   

- Advertisement -