November 24, 2009 at 8:20 am
I created a stored procedure that returns data from multiple databases. Then I created a job to run on a weekly basis and export the data into a CSV file. However, I just want the weekly CSV to contain the new data since the last time the job ran. How would I go about doing this...adding logic in the stored procedure? Thanks
November 25, 2009 at 1:33 am
Try to change the stored procedure so that it gathers only the data that changed since the last time it ran. How you'll achieve this depends on the db schema and on the business logic.
You should also explore the SSIS.
November 25, 2009 at 8:26 pm
You'll need some reference as to when the job last ran in the data somewhere. If you can't add a "ProcessedOn" column to the actual tables, create a new table to remember what has already been process and do an "exclusive" select to not include the data already processed.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply