June 25, 2010 at 10:57 am
I was wondering how I could get around this problem. Here is just some dummy data to sum my problem:
123;John Adams;123 Fake St;some data goes here; but it has a semicolon in the middle;10/12/1978
How can I keep the semi colon in the field 'some data goes here; but it has a semicolon in the middle' so that SSIS doesn't think its a delimiter? Any help is appreciated.
June 25, 2010 at 11:26 am
Do you have any control over generating the file? If so, use text qualifiers around your text data. It should ingore any delimiter character inside of the text qualifiers. Alternatively, change the delimiter to a pipe or another character that will not appear inside of a text column.
If not, you may need to rebuild the file in SSIS into a format that it can use. To do this, you'll need to :
1. identify columns that could potentially contain the delimiter inside of a text column.
2. send the file through a data flow task that opens the file, examines the data, clean up the text columns, and streams the file to a new file that will be easily consumed by a flat file source component.
June 25, 2010 at 11:32 am
No control over the file. 🙁 Thanks for your suggestion I was afraid of that.
June 25, 2010 at 12:53 pm
Can you get the delimiter changed?
If you don't have any control over the file, then you need to be screaming really loud to who does about how they should not be choosing a delimiter for the file that is in the data.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 25, 2010 at 1:00 pm
WayneS (6/25/2010)
Can you get the delimiter changed?If you don't have any control over the file, then you need to be screaming really loud to who does about how they should not be choosing a delimiter for the file that is in the data.
I second the screaming.
June 25, 2010 at 1:20 pm
All those in favor of screeaming say I
Knock
The screaming passes!
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
June 25, 2010 at 2:29 pm
[font="Comic Sans MS"]
Another option - a change anyway on flatfile - to add a text qualifier. Example ""
"123";"John Adams";"123 Fake St";"some data goes here; but it has a semicolon in the middle";"10/12/1978"
This is one of the key purpose of text qualifier - to distinguish between ; in the middle or as a delimeter.
[/font]
[font="Comic Sans MS"]--
Sabya[/font]
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply