﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Wayne Fillis / Article Discussions / Article Discussions by Author  / Conditional Flow in DTS / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 05:07:38 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>Great - just what I was looking for however I found that the If statement had to all be keyed as a single line for it to work.Strange really as the MS SQL HELP also formatted the IF as per the example here.....Now all I need to be find, is how to enquire on a table using ActiveX...:Whistling:</description><pubDate>Tue, 03 Mar 2009 04:17:58 GMT</pubDate><dc:creator>Esalter</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;I agree with you that it is not intuitive when you have a workflow property on a step.  This happened to me on a DTS package I was given to maintain and was a real pain to find out what was going on.  My solution once I found it was to just put an annotation note next to the step regarding the workflow property.  After that experience, I said to myself that I would probably not use them in the future.  But, after reading this article I may have to rethink that position.  A simple note about a workflow property would let you know to look into the step for the code.  Nice simple article.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Thu, 21 Jun 2007 08:38:00 GMT</pubDate><dc:creator>John Dempsey</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;Hi, Lawrence.&lt;/P&gt;&lt;P&gt;Thanks for the advice but this is exactly what I don't want to do.&lt;/P&gt;&lt;P&gt;I'd like to see if in one step I can load the info and validate the number of rows transferred in order to move to a new step (depending in the number of rows).&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description><pubDate>Fri, 08 Jun 2007 09:34:00 GMT</pubDate><dc:creator>Francisco Rodriguez-252375</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>great work man...simply with great potential ..sorry my english...</description><pubDate>Fri, 08 Jun 2007 08:05:00 GMT</pubDate><dc:creator>alexx</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;At one time, I would have considered this to be a "fluff" article that was so obvious that it was a waste of time to read, much less to write.  However, I have recently discovered that, apparently, an awful lot of DBAs come from a non-programming background and that makes this kind of article very valueable.  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Please, don't get me wrong, I am &lt;STRONG&gt;&lt;U&gt;not&lt;/U&gt;&lt;/STRONG&gt; making a negative comment . . . I am saying that your article:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is valuable to the community;&lt;/LI&gt;&lt;LI&gt;Has helped me recognize that I may have an advantage due to both the quantity and nature of my experience;&lt;/LI&gt;&lt;LI&gt;reminds me that the "little things" that one sometimes assumes are "common knowledge" may actually be anything &lt;STRONG&gt;&lt;U&gt;but&lt;/U&gt;&lt;/STRONG&gt; "common knowledge."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Fri, 08 Jun 2007 08:02:00 GMT</pubDate><dc:creator>Ralph D. Wilson II</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;This is excellent!!&lt;/P&gt;&lt;P&gt;I had attempted using that option but could never figure out how it should be used. This will really help me. Thanks!&lt;/P&gt;</description><pubDate>Fri, 08 Jun 2007 07:51:00 GMT</pubDate><dc:creator>shailendra-251422</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;SPAN id=Showtread1_ThreadRepeater__ctl6_lblFullMessage&gt; &lt;P&gt;A very nice  article! &lt;/P&gt;&lt;P&gt;Scripting is really helpful. I have a many a places to pen down where I can use this type of scripting. &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&lt;/P&gt;&lt;/SPAN&gt;</description><pubDate>Fri, 08 Jun 2007 06:43:00 GMT</pubDate><dc:creator>Chada</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;Superlative article! worthy of a DTS for Dummies book.&lt;/P&gt;&lt;P&gt;What I've seen before are MRPOLECAT type scripts which I'm too dumb to get to work.&lt;/P&gt;&lt;P&gt;But your scripts really helped. I have a ton of places where I can use this.&lt;/P&gt;</description><pubDate>Thu, 07 Jun 2007 16:58:00 GMT</pubDate><dc:creator>Carlos Urbina</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;Hi Francisco,&lt;/P&gt;&lt;P&gt;To address your question, you can create another Execute SQL Task after the transformation task that does a COUNT(*) from the destination table and if records exist, proceed with the flow that Wayne explained in his article. Hope this helps.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Thu, 07 Jun 2007 12:30:00 GMT</pubDate><dc:creator>Lawrence Rajan</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;Hi, Wayne, good article.&lt;/P&gt;&lt;P&gt;I have one question.&lt;/P&gt;&lt;P&gt;I run a step that moves info from one table to another and if one or more records were copied I'd like to move to another step (just if records where copied) and if there was an error or no records were copied I'd like to move to a different step. I don't want to depend on success of the step because if there were no records to copy I would receive a success status.&lt;/P&gt;&lt;P&gt;How can I do this ?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description><pubDate>Thu, 07 Jun 2007 08:29:00 GMT</pubDate><dc:creator>Francisco Rodriguez-252375</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;I have always found that workflow scripts are hard to manage because you can't see them in the designer.  When you go to edit old packages that you have forgotten or someone elses code it is hard to figure out what is going on when steps don't fire because of the workflow script.  Instead I use activeX scripts to enable and disable future steps based on previous actions.  These are easier to maintain because youcan see the step in the designer.&lt;/P&gt;&lt;P&gt;I use the following subs to set precedence and diable steps.&lt;/P&gt;&lt;P&gt;sub setprec(dest,src)Set oPkg = DTSGlobalVariables.Parent Set Destination = oPkg.Steps (cstr(dest)) Set Source = oPkg.Steps (cstr(src)) Set Prec = Destination.PrecedenceConstraints.New(Source.name) Prec.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult Prec.value = DTSStepExecResult_Success Destination.PrecedenceConstraints.Add Prec Destination.DisableStep = False&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;sub chkfiles(flnm,tsk)set fso=createobject("scripting.filesystemobject")if fso.fileexists (flnm) then   DTSGlobalVariables.Parent.Steps("DTSStep_DTSDataPumpTask_"&amp;amp;tsk).DisableStep = False setprec "DTSStep_DTSExecuteSQLTask_2","DTSStep_DTSDataPumpTask_"&amp;amp;tskelse DTSGlobalVariables.Parent.Steps("DTSStep_DTSDataPumpTask_"&amp;amp;tsk).DisableStep = Trueend ifend sub&lt;/P&gt;</description><pubDate>Thu, 07 Jun 2007 07:23:00 GMT</pubDate><dc:creator>mrpolecat</dc:creator></item><item><title>RE: Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>&lt;P&gt;I'm still in shock from the fact that I've only just found out you can do this!&lt;/P&gt;&lt;P&gt;Nice one - you've made my day &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&lt;/P&gt;</description><pubDate>Thu, 07 Jun 2007 02:01:00 GMT</pubDate><dc:creator>Michael Lysons</dc:creator></item><item><title>Conditional Flow in DTS</title><link>http://www.sqlservercentral.com/Forums/Topic351598-192-1.aspx</link><description>Comments posted here are about the content posted at &lt;A HREF="http://www.sqlservercentral.com/columnists/WFillis/2929.asp"&gt;http://www.sqlservercentral.com/columnists/WFillis/2929.asp&lt;/A&gt;</description><pubDate>Wed, 14 Mar 2007 13:51:00 GMT</pubDate><dc:creator>Wayne-153714</dc:creator></item></channel></rss>