SSIS:为什么我的文本分隔符不起作用?
SSIS: Why won't my Text Delimiter work?
原来我是这么写的:
Environment:
- SSIS 2012
, Microsoft Visual Studio
Files Involved: Destination Manager: OLEDB
SQL Server
Table
Source Manager: FLATFILE - CSV
File
FORMAT: Delimited
HeadRowDelimiter: {CR}{LF}
Column Delimiter: Comma {,}
Text qualifier: " (manually set)
Header rows to skip: 0
Column Width: 100
Column Type: DT_STR
My File has the following columns:
Year, Lg..., Div Finish, Playoffs, PF, PA...OSRS, DSRS
I wish to only retrieve:
Year, Lg..., Div Finish, Playoffs
But instead of:
|2015,'NFL',...,'2nd of 4',NULL,...,-4,0.3
|2014,'NFL',...,'3rd of 4',NULL,...,0.6,-4.4
The SSIS
package would fail with a message similar to this:
[NFL_Team_List [52]] Error: Data conversion failed. The data conversion for column "Playoffs" returned status value 4 and status
text "Text was truncated or one or more characters had no match in the
target code page.".
However, looking at the data that did go through a couple of times, I
notice the following:
|2015,'NFL',...,'2nd of 4','339,345,-6,Quinn,Jones,Ryan...'
|2014,'NFL',...,'3rd of 4','299,422,-123,Reeves Phillips,Brooking...'
所以问题出在我的分隔符不像分隔符!即使我设置了文本限定符设置,SSIS
似乎无法在动态 FOREACHLOOP
中实际执行此规则,从而导致了问题。
问题:
为什么会这样?
如何让文本限定符按设计工作?
您已将文本限定符设置为 " 但它实际上是 '
原来我是这么写的:
Environment: -
SSIS 2012
,Microsoft Visual Studio
Files Involved: Destination Manager:
OLEDB
SQL Server
TableSource Manager: FLATFILE -
CSV
FileFORMAT: Delimited HeadRowDelimiter: {CR}{LF} Column Delimiter: Comma {,} Text qualifier: " (manually set) Header rows to skip: 0 Column Width: 100 Column Type: DT_STR
My File has the following columns:
Year, Lg..., Div Finish, Playoffs, PF, PA...OSRS, DSRS
I wish to only retrieve:
Year, Lg..., Div Finish, Playoffs
But instead of:
|2015,'NFL',...,'2nd of 4',NULL,...,-4,0.3 |2014,'NFL',...,'3rd of 4',NULL,...,0.6,-4.4
The
SSIS
package would fail with a message similar to this:[NFL_Team_List [52]] Error: Data conversion failed. The data conversion for column "Playoffs" returned status value 4 and status
text "Text was truncated or one or more characters had no match in the target code page.".
However, looking at the data that did go through a couple of times, I notice the following:
|2015,'NFL',...,'2nd of 4','339,345,-6,Quinn,Jones,Ryan...' |2014,'NFL',...,'3rd of 4','299,422,-123,Reeves Phillips,Brooking...'
所以问题出在我的分隔符不像分隔符!即使我设置了文本限定符设置,SSIS
似乎无法在动态 FOREACHLOOP
中实际执行此规则,从而导致了问题。
问题:
为什么会这样?
如何让文本限定符按设计工作?
您已将文本限定符设置为 " 但它实际上是 '