DTS error handling

  • I have a DTS package that abuot halfway through once I BCP in about 10 files, I wanted to run a basic count(*) against some tables to make sure that the counts were greater in the new tables as opposed to the old ones. If the new tables record counts are greater than goto next step else I want the entire packaged stopped. Any ideas?

  • This was removed by the editor as SPAM

  • This is probably a bad way to do this but, in a new T-SQL step create a table called something like CheckCount and populate that with old counts and new counts for each table / file.

    Add a global variable as the next step and populate the global variable with a 1 or a 0 based on the outcome of a query that you run against the CheckCount table. If all new counts are greater than the old counts then give it a 1.

    Add one more step, an ActiveX task, to check the global variable and if it is a 1 then proceed to the next step, if a 0 then mark the step as a failure and don't proceed further.

    I would like to think there would be an easier way to do this but that is all I can think of right now.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply