The criteria is based on the Client, I want to run a query for all the data
that matches that client and send an email to that client, then loop back
and run the query for the next client and send an email to them and loop back again..
What I am trying to do is the following in a DTS Package:
Step1: Create a "ActiveX Script Task" using IF statements for each client. The client info is passed into a
Step2: Now, in the next step I want to run the query based on the global vaiable(which has for the specific
client). Now the reason I am not running the query within the ActiveX Script Task is coz, the output
from the query will be huge and I want to be able to put this in a csv file to send to the client.
Step3: I will just email the client the csv file.
Step4: I want to loop back to Step1 and redo the who process for the next client.
I am having problems in Step2:
a) how can I dump my query results to a csv file, I am using "Execute SQL Task" to run the query
which doesnot allow me to put the results in a csv file.
b) How can I loop back to Step1 to redo the process.