


', Status from '- Send the e-mail with the query results in attachĮxec statuses = switched to using INSERT OPENDATASOURCE instead of OPENROWSET since the former doesn't require having a linked server set up. Select nocount on select CT_Reason_Description ' + + Create the query, concatenating the column name as an alias Create the column name with the instrucation in a variable below generates query and emails dataset as .csv attachmentĬREATE PROCEDURE. I don't know how to do it and if someone else does, can you provide an example to emulate? (column headers start on 11th row, are bold, Tahoma 8 Font, and column header cells highlighted in grey). xlsx report! xlsx template for how formatting is to look is attached. Now I need to modify it to send dataset as a formatted. I already have a working stored procedure that exports sql query data set into a .csv file and emails it.
