本文介绍了SSIS - 将参数传递到ADO .NET源代码查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这在前面已经问。
大部分的答案是不相关的。
谷歌,说明该解决方案是配置的EX pression中的数据流任务,并设置查询。

I know this has been asked earlier.
Most of the answers were not relevant.
Google, shows that the solution is to configure the expression in the "data flow task" and set the query.

然而,在ADO .NET源,当我尝试preVIEW我不断收到输出必须声明变量'@'
它不显示此错误的全部变量 - @ [用户:: GLOBAL_PARAMETER]

However in the ADO .NET source, when I try to preview the output I keep getting "Must declare the variable '@'"
It does not show the full variable in this error - "@[User::GLOBAL_PARAMETER]"

我想这是因为[用户::不是SQL里面的语法正确;但一个人如何设置呢?!

I think that's because "[USER::" isn't the correct syntax inside a SQL; but then how does one set it ?!

推荐答案

从你的描述好像你有一个错误,由于使用,而不是处理过的变量值的查询字符串中的变量名。换句话说:

From your description it seems like you are having an error due to using the variable name inside the query string as opposed to the processed variable value. In other words:

SELECT * FROM @ [网友:: TABLE]在EX pression建设者将错误

"SELECT * FROM @[User::TABLE]" in the expression builder would be WRONG

SELECT * FROM+ @ [网友:: TABLE] 正确

这将帮助,如果你共享你正在使用的查询

It would help if you shared the expression you are using as a query

这篇关于SSIS - 将参数传递到ADO .NET源代码查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 19:44