September 6, 2012 at 2:53 am
Hi
I have a requirement where I need to send the query resukts to my co-ordinator.
The query is to find out the latest Transaction Date in three processes at the end of the day.
We have three different SQL select queries to find out this for three processes.
Is there any way by which we can automate the sending of these query results to my co-ordinator.
Any help is really grateful.
September 6, 2012 at 3:18 am
Use DB mail and build up a mail via T-SQL and schedule it to run via SQL Agent.
September 6, 2012 at 3:31 am
Anthony, can you explain more on it and how it can be done.
Guys, any other ideas are also welcome
September 6, 2012 at 3:41 am
Configure DB Mail if not already done so
Lookup sp_send_dbmail in BOL or Google
Declare a parameter which takes in a string, then run your select statements, build up the string and assign it to the parameter
Pass the parameter into the sp_send_dbmail command
Hey presto.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply