SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Errors importing file in SSIS when upgrading from 2005 to 2012


Errors importing file in SSIS when upgrading from 2005 to 2012

Author
Message
ken_england
ken_england
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 320
We are migrating to 2012 and all is going well except for an SSIS issue.

We nightly download a financial file from an external provider. An SSIS package then loads this into a table using a flat file source. Nothing too sophisticated.

This works fine under 2005 but have hit a problem in 2012, getting the error:

[Source File [116]] Error: The column delimiter for column "Description 2" was not found.
[Source File [116]] Error: An error occurred while processing file
"\\xxx\yyy\ myfile.csv" on data row 41935.

On further investigation of the file we can see the row has a double text delimiter (“) inside the column separators (,) (just prior to AAA below).

"56371","03-DEC-2010","22-JUN-2010","03-DEC-2012","ABC","PQR","ZZSWAP",""AAA Frz 15Oct@5 % PPP 22/SEP/2011", “CREQWE"

Researching this, it appears there are changes in this area for 2012.
This is causing us big issues as we have no ability to avoid this in the source. The format is delimited, delimiter is comma and text qualifier double quote.

Anyone any ideas how we can modify the package so it handles this like 2005 please?
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18307 Visits: 20410
How did 2005 handle it? Did it ignore one of the two repeated "s?

If it did, sounds like a bug to me.

I just had a quick look - if you set the 'Text Qualifier' property to <empty string>, SSIS can at least parse the columns correctly (though of course the " characters remain).

You could subsequently do a Replace in your data flow to get rid of them.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
ken_england
ken_england
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 320
SQL 2005 treated the extra " as a normal character so " appears in the database column
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18307 Visits: 20410
How big is the file, roughly?

One option would be to pre-process it - maybe use s script task to replace "" with ".

If the file is huge, it might make sense to do it a different way though.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
ken_england
ken_england
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 320
That's the conclusion we're come to also!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search