I have an SQL table that represents the material currently committed to a job. Whenever a job is completed the data is removed, as we only want long-term records of the final material used.
The problem is that we now want to get the Job Number and Material Number for each committed material over the past week (including those that have cleared when the job was completed) as an email message. We'd rather not create a new table or send emails daily.
Is there anyway to get Database Mail (through a SQL Server Agent Job or something else) to gather the information on a day-by-day basis (probably more than once a day) but only send one email at the end of the week?