SSMS SP Output to Excel attachment and Email

Soldato
Joined
6 Mar 2008
Posts
10,084
Location
Stoke area
Hi,

I'm rewriting a script that we run every wednesday and email to our clients, some 800+ rows.

I've got another script to add in but I need to create an SP, then an agent job to run each week which I can figure out.

My problem is, what's the best way of getting the results out of SSMS into a spreadsheet and then have it set as an attachment and email it out?

Thanks
 
thanks for the feedback, it gives me things to investigate.

I know we've done this before on another call but the analyst has now left and in all honesty, i don't remember it being pretty or proper, a hack job.
 
Come into work to have a play, no SSRS installed and after speaking to the MI/BI gues I need to put a service request in to get it..
 
I'm not a dev, I'm a first line analyst, although in most other businesses I'd be second or third line. Our dev's do have dev environments and we've BI and MI teams that could do this. it's just been dumped on me because "Stu likes a challenge!"

I've had SQL Server Data Tools 2015 installed and managed to use the report wizard to generate the initial report, just need to figure out how to automate it and have it send an email wth the report as a csv file.

Never a dull day here :D
 
Back
Top Bottom