SSIS - 变量空值和非空值的日期列
在 SSIS 包中,我有一个数据流,它从访问数据库中提取两列、一个任务 ID 和一个日期,
我将其存储在 ADO 记录集中并将其传递给 For Each 循环容器,
我正在尝试将每个值对分配给两个变量“任务ID”和“任务日期” 然后,我想在 SQL 插入任务中使用这两个变量,该任务将使用此信息在多个位置更新 SQL 数据库。
当我只是取出任务 ID 并将其插入到 sql 中时,包工作正常,但当我引入日期时,它失败了因为日期可以为 NULL 并且大多数任务都是 NULL 但 SSIS 一直告诉我它不能将 null 放入变量中,我尝试使用一个允许 null 的 Obejct 变量,但随后包在将变量添加到 sql 任务时失败因为变量中有一个日期?
谢谢
Within an SSIS package I have a dataflow that extracts two coloumns from an access database a TaskID and a date
I store this in a ADO recordset and pass this to a For Each Loop Container
I am them attempting to assign each value pair to two variables "taskID" and "taskDate"
I then want to use thse two variables within a SQL Insert task that will then update the SQL database in several places with this information
The package works fine when im just pull out the taskID and insert that into sql but when i introduce the date it fails because the date can be NULL and most of the tasks are NULL but SSIS just keeps telling me that it cant put null into the variable, I tried having an Obejct variable which allowed nulls but then the package fails on adding the variable to the sql task as the variable in there is a DATE?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此处列出了一个可能的解决方案使用第二个变量和 EvaluateAsExpression 可以解决您的问题。
There's a possible solution outlined here that uses a second variable and EvaluateAsExpression that may solve your problem.