 |
|
 |
|
Next: how to query top 1 record for each group
|
| Author |
Message |
External

Since: Jun 11, 2007 Posts: 4
|
(Msg. 1) Posted: Wed Aug 22, 2007 11:57 am
Post subject: E-Mailing stored procedure results of job (SQL Server 2005) Archived from groups: microsoft>public>sqlserver>programming, others (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Aug 22, 2007 Posts: 2
|
(Msg. 2) Posted: Wed Aug 22, 2007 11:57 am
Post subject: Re: E-Mailing stored procedure results of job (SQL Server 2005) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Aug 22, 11:09 am, Zamdrist wrote:
> What would be the preferred method of e-mailing the results of a
> stored procedure ran via a scheduled job? The results would be sent to
> myself, doesn't have to be fancy or anything.
>
> I have the procedure, I can create the job...anything pointers would
> be appreciated. Thank you.
>
> Steve
Steve,
Under Sql Server Agent --> Jobs --> Right click on the job and
select properties.
On the notifications tab, you can elect to email the results of the
job. >> Stay informed about: E-Mailing stored procedure results of job (SQL Server 2005) |
|
| Back to top |
|
 |  |
External

Since: Aug 22, 2007 Posts: 2
|
(Msg. 3) Posted: Wed Aug 22, 2007 11:57 am
Post subject: Re: E-Mailing stored procedure results of job (SQL Server 2005) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Aug 22, 11:15 am, J....TakeThisOut@GoldSaucer.Com wrote:
> On Aug 22, 11:09 am, Zamdrist wrote:
>
> > What would be the preferred method of e-mailing the results of a
> > stored procedure ran via a scheduled job? The results would be sent to
> > myself, doesn't have to be fancy or anything.
>
> > I have the procedure, I can create the job...anything pointers would
> > be appreciated. Thank you.
>
> > Steve
>
> Steve,
>
> Under Sql Server Agent --> Jobs --> Right click on the job and
> select properties.
>
> On the notifications tab, you can elect to email the results of the
> job.
If you need to email data generated by the stored procedure, one
method is to have the Procedure create a temporary table, then use
XP_Sendmail to mail that table to yourself.
Exec master..XP_Sendmail @Recipients = 'YourEmail@You.Com',
@Subject = 'Results of Stored Procedure SPNAME'
, @query = 'Select Information from #TTable' >> Stay informed about: E-Mailing stored procedure results of job (SQL Server 2005) |
|
| Back to top |
|
 |  |
External

Since: Jun 11, 2007 Posts: 4
|
(Msg. 4) Posted: Wed Aug 22, 2007 11:57 am
Post subject: Re: E-Mailing stored procedure results of job (SQL Server 2005) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Aug 22, 9:09 am, Zamdrist wrote:
> What would be the preferred method of e-mailing the results of a
> stored procedure ran via a scheduled job? The results would be sent to
> myself, doesn't have to be fancy or anything.
>
> I have the procedure, I can create the job...anything pointers would
> be appreciated. Thank you.
>
> Steve
I should clarify...I need the result set returned by the procedure,
and not just success/failure of the job. Thanks. >> Stay informed about: E-Mailing stored procedure results of job (SQL Server 2005) |
|
| Back to top |
|
 |  |
External

Since: Jun 11, 2007 Posts: 4
|
(Msg. 5) Posted: Wed Aug 22, 2007 1:57 pm
Post subject: Re: E-Mailing stored procedure results of job (SQL Server 2005) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Aug 22, 9:18 am, J....DeleteThis@GoldSaucer.Com wrote:
> On Aug 22, 11:15 am, J....DeleteThis@GoldSaucer.Com wrote:
>
>
>
> > On Aug 22, 11:09 am, Zamdrist wrote:
>
> > > What would be the preferred method of e-mailing the results of a
> > > stored procedure ran via a scheduled job? The results would be sent to
> > > myself, doesn't have to be fancy or anything.
>
> > > I have the procedure, I can create the job...anything pointers would
> > > be appreciated. Thank you.
>
> > > Steve
>
> > Steve,
>
> > Under Sql Server Agent --> Jobs --> Right click on the job and
> > select properties.
>
> > On the notifications tab, you can elect to email the results of the
> > job.
>
> If you need to email data generated by the stored procedure, one
> method is to have the Procedure create a temporary table, then use
> XP_Sendmail to mail that table to yourself.
>
> Exec master..XP_Sendmail @Recipients = 'YourEm...@You.Com',
> @Subject = 'Results of Stored Procedure SPNAME'
> , @query = 'Select Information from #TTable'
Thank you >> Stay informed about: E-Mailing stored procedure results of job (SQL Server 2005) |
|
| Back to top |
|
 |  |
External

Since: Jun 11, 2007 Posts: 4
|
(Msg. 6) Posted: Wed Aug 22, 2007 1:57 pm
Post subject: Re: E-Mailing stored procedure results of job (SQL Server 2005) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Sep 06, 2010 Posts: 1
|
(Msg. 7) Posted: Mon Sep 06, 2010 12:25 pm
Post subject: Help Needed [Login to view extended thread Info.] Archived from groups: microsoft>public>sqlserver>programming (more info?)
|
|
|
I have the same requirement. Can you please help me out? Please let me know, how you have scheduled the stored prcedure and emailed the result by using Database mail?
Thanks in advance
Rohit
> On Wednesday, August 22, 2007 11:09 AM Zamdrist wrote:
> What would be the preferred method of e-mailing the results of a
> stored procedure ran via a scheduled job? The results would be sent to
> myself, doesn't have to be fancy or anything.
>
> I have the procedure, I can create the job...anything pointers would
> be appreciated. Thank you.
>
> Steve
>> On Wednesday, August 22, 2007 11:14 AM Zamdrist wrote:
>> I should clarify...I need the result set returned by the procedure,
>> and not just success/failure of the job. Thanks.
>>> On Wednesday, August 22, 2007 11:15 AM Jef wrote:
>>> Steve,
>>>
>>> Under Sql Server Agent --> Jobs --> Right click on the job and
>>> select properties.
>>>
>>> On the notifications tab, you can elect to email the results of the
>>> job.
>>>> On Wednesday, August 22, 2007 11:18 AM Jef wrote:
>>>> On Aug 22, 11:15 am, J... DeleteThis @GoldSaucer.Com wrote:
>>>>
>>>>
>>>>
>>>> If you need to email data generated by the stored procedure, one
>>>> method is to have the Procedure create a temporary table, then use
>>>> XP_Sendmail to mail that table to yourself.
>>>>
>>>>
>>>> Exec master..XP_Sendmail @Recipients = 'YourEmail@You.Com',
>>>> @Subject = 'Results of Stored Procedure SPNAME'
>>>> , @query = 'Select Information from #TTable'
>>>>> On Wednesday, August 22, 2007 11:42 AM Zamdrist wrote:
>>>>> Thank you
>>>>>> On Wednesday, August 22, 2007 12:04 PM Zamdrist wrote:
>>>>>> Actually, I have discovered that using 'Database Mail' would be the
>>>>>> recommended and preferred method to mail the procedure results in SQL
>>>>>> Server 2005.
>>>>>>
>>>>>> Thanks
>>>>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>>>>> MongoDb vs SQL Server Basic Speed Tests
>>>>>> http://www.eggheadcafe.com/tutorials/aspnet/6f573869-c8eb-40c3-9946-2f...0163966 >> Stay informed about: E-Mailing stored procedure results of job (SQL Server 2005) |
|
| Back to top |
|
 |  |
| Related Topics: | Q: Linked Server and Stored Procedure - Hi! I have created a Linked Server and a stored procedure. In the stored procedure i create a temporary table i fill the temporary table with data from the linked server. use the temp table to issue a couple of things if i execute this sproc directly...
Conditional log in a stored procedure (Sql server 2000) - Hi, Is there a way to achieve conditional execution of statements (to log execution steps) inside a stored procedure? We are looking to set this ON/OFF based on a global parameter(only for our procedure) e.g we'll have code blocks like the following....
stored procedure - i have a stored proc which will output a result set how can i store the result set into a table?
Stored Procedure help!! - Hi friends Can someone help to write a stored procedure that will parse a comma separated text file and populate the same into a database table. There will be n number of records with two column values like.. 1, Me 2, You 3, We Thank you in..
Help with a Stored Procedure.. - Can anybody help me with this stored procedure? Basically I need to do something like do: Total = Premium + (WHEN AddOn1 != -1) + (WHEN AddOn2 != -1) + (WHEN AddOn3 != -1) To clarify, the value 'Total' needs to consist of a field called 'Premium' plus.... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|