在 SSIS 中插入两个变量到对象 [英] Insert two variables to object in SSIS

查看:46
本文介绍了在 SSIS 中插入两个变量到对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有,

我正在尝试存储两个变量的值:

I am trying to store the value of two variables:

Variable1Value:    2014-05-10 00:00:00.000
Variable2Value:    2014-05-08 00:00:00.000

进入一个对象类型变量,以便我在 SSIS 中使用 FOREACH LOOP 循环它,但是,我不知道该怎么做.

Into an Object type variable so that I loop it with a FOREACH LOOP in SSIS but, I don't know how to do it.

通常使用 OLE DB 连接,我会创建一个类型为 object 的变量并将结果集存储在那里,但使用 ODBC 连接,情况并非如此,因为该步骤总是失败.

Normally with a OLE DB connection, I would create a variable of type object and stored my result set there, but with an ODBC connection, that's not the case, because the step always fails.

谁能帮帮我.

谢谢

推荐答案

我会将执行 SQL 任务替换为数据流任务.在里面,我将从一个带有 ODBC SQL 语句的 ODBC 源组件开始.然后我会将其连接到 Recordset Destination,并将其配置为对象类型变量.

I would replace the Execute SQL Task with a Data Flow Task. Inside that, I would start with an ODBC Source component with your ODBC SQL statement. Then I would connect that to a Recordset Destination, and configure that for the Object type Variable.

此设计还公开了返回列的 SSIS 数据类型(例如在 Recordset Destination 中),避免在下游使用它们时进行猜测.

This design also exposes the SSIS Data Types of the returned columns (e.g. in the Recordset Destination), avoiding guesswork when you come to use them downstream.

这篇关于在 SSIS 中插入两个变量到对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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