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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional execution within a DTS Package

Status
Not open for further replies.

sharong1

MIS
Jul 19, 2006
1
US
Our DTS PKG outputs a spreadsheet and we need to know how to email the spreadsheet
when the spreadsheet is empty , even though our task succeeds
 
Are you asking how to send emails or how you would condition the sending of an email?

If it's the latter....

I would suggest you perform a Select Count(*) from ... on the criteria you are using to create the text file. Store the result of the count in a Global Variable. In a separate task (ActiveX script or whatever method you use to send emails), check if the count returns zero and then send the email.

You can send emails by using xp_sendmail, or by using an SMTP email process, or the Email task within DTS.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top