We have a simple DTS that basically dumps records into a text tab delimited file nightly. We would like to first check to see if there are records prior to creating the file. Something like an ActiveX task that runs the query, gets rowcount and if rowcount = 0 halt the DTS otherwise process the file.
Here's the query to get the records:
Any help with the task would be greatly appreciated.
Here's the query to get the records:
Code:
select emailaddress as EMAIL from
view_lead_display2
where (DateDiff (day,LeadInsertDate ,getdate() )=1)
and unsub='0' and leadid not in (select distinct leadid from dbo.Leads_Reassigned)
Any help with the task would be greatly appreciated.