Link to home
Start Free TrialLog in
Avatar of rwheeler23
rwheeler23Flag for United States of America

asked on

SSIS and a comma within text fields insist on breaking one field into two fields.

I have two very similar queries pulling this column value out of a table. These queries are embedded into two separate SSIS csv flat file export packages.
[Zone Location]
(42.628714605774775,-73.763909085255904)
(42.636101731163215,-73.781746725049999)
(42.666456988124622,-73.769417826333267)
(42.696827302737731,-73.848687575844366)
(42.644585953193598,-73.75781304403651)

All fields in both tables are defined as varchar(max). The first export package works perfectly every time. The second one is giving me fits because when it goes from the SQL query to the csv flat file, it insists on braking this one field into two and after that all the subsequent fields are out of alignment. I have been staring at both packages and everything is set up the same except the query. How can I force SSIS to recognize this value as text and accept the comma as part of the field value?
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rwheeler23

ASKER

Well I was about to go find a bridge abutment, but instead I took a closer look at this dataset. This dataset has a description column in it. On the very first record there was a single apostrophe. Apparently that threw everything off for all the other records. I added a REPLACE into my script on that column to remove that SOB plus I put the parentheses back around the column I thought was causing issue.

Thanks All Around Good Guy!

P.S. I also learned a valuable lesson. The Preview button on the flat file does not show you data coming down from the SQL query it shows you what is currently in the flat file. I kept changing my script and could not understand the data was not changing. What a maroon I can be sometimes.
love the bugs bunny reference.
Thanks guys. I try to find humor in everything. Otherwise what is the point? Here is a great shot to liven your day. This was taken after one of the Mars rover landings.
MarvinMartian.bmp
Split
Thanks