Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop DTS with SQL Task properties

Status
Not open for further replies.

gyfu

Programmer
May 28, 2001
77
0
0
HK
Hey guys,
I am a newbie with DTS and I hope you can help me with this problem I have.

I am running a about 4 sql statements on a few tables to check the integrity of the tables. These statements are basically checking for duplicates and some other conditions. Let me mention that the data was transform from a text file into these tables.

However, if any of these select statement return any records, I would like to stop the dts from going further.

I hope it makes sense. I was thinking that I might have to use active scripts, but not sure how I can use it and include the sql statments and so forth.

any advise is greatly appreciated thanks.

-- gyfu --
Crystal Ver 10
Microsoft SQL
 
Here you need kind of decision making functionality. One way you could try (not 100% sure),

Write an ActiveX Script Task which checks for your condition of failure. Say if you find that condition to be true (you want to suspend the execution), deliberately write VB code in that ActiveX Script Task, which will fail it (may be some sort of error - divide by zero). On the other side, you would have connected the next task in series with 'On success' arrow.

Makes sense?

Malay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top