Click here to Skip to main content
15,891,621 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

I have a stored procedure that is invoked by a report to produce a result set. It takes in 2 date parameters (normally both dates are the same and are that of the day before).

I would like to create some kind of job that invokes the stored procedure with yesterday's date, exports the result set to CSV format and emails it to a list of recipients. The job must run daily.

What is the preferred or recommended way to accomplish this (SQL Job, Win Service, Other)?

Thanks in advance,
Genaro
Posted

My suggestion would be to use an SSIS job. I use them to perform many functions like this. This is a data reporting task and I always like to leave data tasks on the db when possible.
 
Share this answer
 
v2
Comments
picazo 13-Dec-10 15:00pm    
Good idea! I think I might go that route.
Other way could be to run a windows service on the server that will be activated after defined interval. It will pull in the data, create the report and email it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900