带参数OLEDB的SQL命令文本 [英] SQL Command text with parameter OLEDB Source
问题描述
我正在使用SQL Server Integration Services2008.在我的数据流任务中,我获得了OLEDB源.我选择SQL命令作为数据访问模式,以下是我的sql文本
I am working with SQL Server Integration Services 2008. In my Data Flow task I got a OLEDB source. I choose SQL command as the Data Access mode and following is my sql text
Select * from table1 where ID=?
在参数"选项卡中,我的参数名称"为零"0",并且值来自程序包级别变量.
And from parameters tab my Parameter Name is zero "0" and value is coming from a package level variable.
我尝试将参数名称替换为"Parameter0",但始终会得到相同的错误
I tried to replace the parameter name with "Parameter0" but I always get the same error that
Error: "No Value given for one or more required parameters"
但是我的变量有一个值
请帮助
推荐答案
您在做正确的事情,但是预览"不适用于参数化的源任务.尝试执行该程序包,您应该没问题.
You are doing the right thing, but it is the "Preview" that is not working for parameterized source tasks. Try executing the package and you should be ok.
这篇关于带参数OLEDB的SQL命令文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!