在 ssis 控制流中选择性地执行任务 [英] selectively execute task in ssis control flow

查看:34
本文介绍了在 ssis 控制流中选择性地执行任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有控制流的 SSIS 包,其中包含一系列按顺序执行的 sql 任务.

I have a SSIS package with a control flow containing a bunch of execute sql tasks in a sequence.

我需要检查每个任务的标志,如果设置了就运行任务,如果没有则跳过并转到下一个.

I need to check a flag for each of the tasks and run the task if it is set, if not skip and go to the next one.

这些任务中的每一个都执行一个存储过程.因此,如果未设置,我可以检查 proc 并返回".如果有的话,我正在寻找SSIS"解决方案.

Each of the these task executes a stored proc. So i can check in the proc and "Return" if not set. I was looking for a "SSIS" solution if any.

TIA

附注

推荐答案

在控制流任务之间,单击箭头并选择编辑".当你这样做时,你会得到一个对话框,允许你检查任务的约束"(成功、完成或失败),一个表达式"(即你可以让你的执行 sql 任务返回一个值,将该值存储在一个变量,并在表达式中检查该变量的值以确定是否继续沿您正在编辑的路径)、表达式和约束"以及表达式或约束".除了逻辑之外,这最后两个是相同的.表达式和约束"要求表达式和约束条件都为真,表达式或约束条件"只要求表达式和约束条件之一为真.

Between your control flow tasks, click on the arrow and choose Edit. When you do this, you get a dialog that allows you to check the "constraint" (success, completion or failure) of the task, an "expression" (i.e. you can have your execute sql task return a value, store that value in a variable, and check the value of that variable in an expression to determine whether to continue down the path you are editing), an "expression and a constraint", and an "expression or a constraint". These last two are the same except for the logic. "Expression and constraint" requires a true condition on both the expression and the constraint, "expression or constraint" requires a true condition on only one of the expression and the constraint.

这篇关于在 ssis 控制流中选择性地执行任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆