参数化OLEDB源查询 [英] Parameterized OLEDB source query
问题描述
我正在 SSIS 中创建一个 ETL,其中我希望我的数据源是一个受限查询,例如 select * from table_name where id='Variable'
.这个变量就是我定义为用户创建的变量.
I am creating an ETL in SSIS in which I which I want my data source to be a restricted query, like select * from table_name where id='Variable'
. This variable is what I defined as User created variable.
我不明白如何让我的源查询与 SSIS 范围变量进行交互.
I do not understand how I can have my source query interact with the SSIS scoped Variable.
目前唯一的选项是
- 表
- 来自变量的表格
- SQL 命令
- 来自变量的 SQL 命令
我想要的是一个以变量为参数的 SQL 语句
What I want is to have a SQL statement having a variable as parameter
推荐答案
简单.选择SQL command
作为数据访问模式.使用问号作为参数占位符输入您的查询.然后单击 Parameters
按钮并将您的变量映射到 Set Query Parameters
对话框中的 Parameter0
:
Simple. Choose SQL command
as the Data Access Mode. Enter your query with a question mark as a parameter placeholder. Then click the Parameters
button and map your variable to Parameter0
in the Set Query Parameters
dialog:
这篇关于参数化OLEDB源查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!