Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dc13859
Starting Member
3 Posts |
Posted - 2007-12-18 : 12:43:34
|
Hi,I have a DTS package which nightly emails out the results of a db query in a flat file.I need to be able to stop the email going out if the db query produces no results.In other words, if a select count(*) = 0 then quit DTS.Any idea how I can do this? I'm thinking that I need to create a global variable based on the query count and then use a VB script to look at the value and exit if required.Any assistance would be greatly appreciated.Rgd's,Dave |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-18 : 22:31:34
|
There are workflows in dts package. |
|
|
dc13859
Starting Member
3 Posts |
Posted - 2007-12-19 : 06:08:06
|
The workflow process, as I understand it, allows the DTS package to directed based on the success or failure of a specified previous step. I'm not sure though how the result of a db query can by identified as a success or failure. If Select Count(*) from tablename = 0 how can I flag that SQL query step as having failed for the benefit of the subsequent step(s)?Tks, Dave |
|
|
|
|
|