SSIS:为​​什么我的文本分隔符不起作用? [英] SSIS: Why won't my Text Delimiter work?

查看:107
本文介绍了SSIS:为​​什么我的文本分隔符不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初我写了以下内容:

环境:- SSIS 2012Microsoft Visual Studio

Environment: - SSIS 2012, Microsoft Visual Studio

涉及的文件:目标管理器:OLEDB SQL Server Table

Files Involved: Destination Manager: OLEDB SQL Server Table

源管理器:FLATFILE - CSV 文件

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

我的文件包含以下列:

Year, Lg..., Div Finish, Playoffs, PF, PA...OSRS, DSRS

我只想检索:

Year, Lg..., Div Finish, Playoffs

但不是:

|2015,'NFL',...,'2nd of 4',NULL,...,-4,0.3
|2014,'NFL',...,'3rd of 4',NULL,...,0.6,-4.4

SSIS 包会失败,并显示类似以下的消息:

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 "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...'

所以问题在于我的分隔符不像分隔符!即使我设置了 Text Qualifier 设置,SSIS 似乎也无法在动态 FOREACHLOOP 中实际执行此规则,从而导致问题.

So the problem was on my delimiters are not acting like delimiters! Even though I set the Text Qualifier setting, it seems that SSIS is unable to actually enforce this rule in the dynamic FOREACHLOOP, leading to the issue.

问题:

  • 为什么会这样?

  • Why is this the case?

如何让文本限定符按设计工作?

How can I get the Text Qualifier to work as designed?

推荐答案

您已将文本限定符设置为 " 但它实际上是 '

You've set your text qualifier to " but it is actually '

这篇关于SSIS:为​​什么我的文本分隔符不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆