SISS 变量 -
我在包级别创建了用户定义的 SSIS 变量。
示例:这里是变量
v1 = 10
v2 = 20
v3
结果应该是 V3 = V1 +V2 我应该在控制流中的哪里给出这个表达式以及我会得到结果
请帮助
谢谢
I have created user defined SSIS variables at the package level.
Example: Here are the varibales
v1 = 10
v2 = 20
v3
The result should be V3 = V1 +V2 Where should i give this expression in the control flow and will i get the result
Please help
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我是否遗漏了某些内容,或者是否有原因 表达式 不会够了吗?
给定如上所述定义的变量
在变量 v3 上将“Evaluate as Expression”设置为 True,对于表达式,使用@[User::v1] + @[User::v2] (或单击省略号并使用所见即所得编辑器构建表达式)
如果您注意到 v3 的粉红色角,那是因为我运行了一个名为 BIDSHelper 它可以帮助您完成 SSIS 开发任务,但绝不会影响我的解决方案的工作。
Am I missing something or is there a reason an expression won't suffice?
Given variables defined as described above
Set "Evaluate as Expression" to True on the variable v3 and for the Expression, use @[User::v1] + @[User::v2] (or click the ellipses and build the expression with the WYSIWYG editor)
If you notice the pink corner of v3, that is due to me running an add-in called BIDSHelper which can assist in your SSIS development tasks but in no way affects the workings of my solution.
您可以在脚本组件中操作变量。如果您使用的是 SQL-Server 2005,则可以使用 VB.Net;如果您使用的是 2008,则可以选择 VB.Net 或 C#.net。
以下是我用来获取变量(在我的例子中为字符串)、操作它们并将它们发送回变量存储区域的一些(VB.net)代码示例:
对您的数字执行相同的操作,在内部脚本组件(我对 VB 有点生疏)
You can manipulate variables within a Script Component. If you're using SQL-Server 2005 you get to use VB.Net, if you're using 2008, you have the choice of that or C#.net.
Here are some (VB.net) examples of code I've used to get variables (strings in my case), manipulate them, and send them back to the variable storage area:
To do the same with your numbers, in the guts of the Script Component (I'm a bit rusty with VB)