I need a store procedure written for SQL Server 2005. This stored procedure will generate an HTML formatted email and send it using dbmail. I have already written the portion of the email that extracts the information from the database. I have the HTML format described in an excel file. The HTML formatting part has alrerady been started, so there is a clear example to follow. DBMail is already functional on our machine.
The missing piece that I need done is completeing the code to create the HTML email body.
I have attached the excel spreadsheet so you can see exactly what the HTML email is supposed to look like. I've also attached the code so far so you can see exactly what needs to be finished.