Email within DTS package

Last Post 13 Jul 2006 08:24 AM by dbandee. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
ninelg
New Member
New Member

--
11 Jul 2006 10:35 AM
I need to create a DTS package that sends out an email based on a query.

Query:

<br>SELECT @Count= count(*) FROM employee WHERE site = 1
<br>


If @Count=0 I don't want an email to be sent. If @Count>=1 then the email should be sent out.

How do I set up the package to reflect this?

Thanks,
Ninel
dbandee
New Member
New Member

--
13 Jul 2006 08:24 AM
your DTS will be simlpy executing a query, in query u can use xp_sendmail procedure to send email. For that u would need SQLMail up and running in SQL Server

Or use CDO.Message email if u dont have SQLMail configured.

hope this helps


Acceptable Use Policy
---