all groups > sql server dts > july 2007 >
You're in the

sql server dts

group:

conditional DTS


conditional DTS timcronin
7/3/2007 9:18:11 PM
sql server dts:
Sorry, this is from 12 year DBA, DTS rookie. I have a DTS package whichis
simple. SQL to check for records. If there are rows of data dump to text file
and email. All works, however I need it not to email if the rowcount is 0.
This is where I am stuck
Re: conditional DTS Allan Mitchell
7/4/2007 12:00:00 AM
Hello timcronin,

OK so what you will do is

You get the count of rows from the table into a variable using the ExecuteSQL
task

Test in a Script Task for the count of rows/variable value.

You turn on or off the eMail step depernding on your logic.

We do a similar thing here

http://www.sqldts.com/246.aspx


step 4

Here we test for if we have more files and if not then we enable/disable
he steps.


--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button