SSIS 2008 列有空值
我目前正在开发一个 SSIS 包,我们正在将其从 SSIS 2005 迁移到 SSIS 2008。
问题是当前版本的开发人员使用了这样一个事实:在 SSIS 2005 中,NULL 列的访问器返回 0,而 SSIS 2008 则抛出例外。
此外,他们还广泛使用如下表达式:
IIf(Row.X_IsNull, System.DBNull.Value, Row.X)
问题是,在 SSIS 2008 中,无论条件是否设置为 true,程序仍会尝试读取 Row.X 并引发异常。
该包很大,将所有这些 IIf 转换为带有临时变量的手动 If 需要很长时间。
任何帮助将非常感激,
PM
I am currently working on an SSIS package that we are migrating from SSIS 2005 to SSIS 2008.
The issue is that the developers of the current version used the fact that in SSIS 2005 the accessor of a NULL column returns 0, whereas SSIS 2008 throws an exception.
Also, they extensively use expressions such as this one:
IIf(Row.X_IsNull, System.DBNull.Value, Row.X)
The problem is that in SSIS 2008, regardless of whether the condition is set to true, the program still tries to read Row.X and throws an exception.
The package is big and it would take a very long time to convert all of these IIfs to manual Ifs with temporary variables.
Any help would be really appreciated,
PM
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将包保存为文件。这是一个 XML 文件。在文本编辑器中找到您要更改的代码,然后取出相关部分以供稍后搜索。在 BIDS 中,进行第一次修复并重新保存文件。然后,您可以在文本编辑器中打开该文件,找到问题的其他实例(通过仔细阅读之前的文件,您知道要查找什么),并将它们替换为您在文件中修复生成的相同类型的代码。保存,然后在BIDS中打开并测试。
Save the package as a file. This is an XML file. find the code you are looking to change in a text editor and pull out the pertinant parts to search for later. In BIDS, make the first fix and resave the file. You can then open the file up in a text editor and find the other instances of the problem (you know what to look for from your perusal of the earlier file) and replace them with the same kind of code your fix generated in the file. SAve, Then open up in BIDS and test.