gpt4 book ai didi

SSIS 表达式设置两个变量

转载 作者:行者123 更新时间:2023-12-04 01:31:53 29 4
gpt4 key购买 nike

我试图在 SSIS 中使用“表达式任务”来简单地初始化/设置两个变量。这个看似简单的任务让我抓狂,因为我不知道如何分离语句:

@[User::testVariable]="1"  
@[User::testVar2]=3

这会导致解析错误,我已经阅读了很多文档,但无济于事。语句是如何分隔的,我希望我不必使用多个表达式任务,因为我有很多变量...谢谢

最佳答案

您一次只能设置 1 个变量:

To change the value of a variable during runtime you need an expression or a Script Task. The expression isn't very flexible and the Script Task requires .Net knowledge. That's why Microsoft introduced the Expression Task in SSIS 2012. It enables you to set the value of one variable during runtime. Downside is that it isn't available for 2008 and you can only set one variable at a time.



http://microsoft-ssis.blogspot.com/2013/07/custom-ssis-component-multiple.html

您必须下载定制的 Multiple Expressions Task链接上提供的组件或执行 Expression Task对于每个变量。

关于SSIS 表达式设置两个变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30808190/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com