Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Sending mail every monday automatically...,

Author  Topic 

Mageshkumar
Starting Member

29 Posts

Posted - 2008-07-19 : 04:29:28
Hi guys while executing my procedure i am getting records like this:

Mid EmployeeName Date Subject
22 Name1 7-23-2008 Sub1
22 Name1 7-27-2008 Sub2
22 Name1 7-28-2008 Sub3

Mid EmployeeName Date Subject
22 Name2 7-21-2008 Sub132
22 Name2 7-28-2008 Sub234
22 Name2 7-23-2008 Sub3

Mid EmployeeName Date Subject
23 Name3 7-21-2008 Sub11
23 Name3 7-25-2008 Sub12
23 Name3 7-28-2008 Sub13

Mid Mailid
22 Man@yahoo.com
23 man2@rediff.com

Now every monday this stored procedure have to execute
and have to send mail to managers his employee records...,

mean That first 2 table have to send to man@yahoo.com
and the last one have to send man2@rediff.com

Its possible in sqlserver2005?

Plz give me some ideas abt this...,

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-07-19 : 05:28:51
Yes , One way of doing this is to set it up as a Job - which allows you to schedule the day/time .
You could either have all this in 1 stored procedure , with the result sets as text passed into your email .
Alternatively , you could run this as an SSIS package

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-20 : 02:10:01
http://www.mssqltips.com/tip.asp?tip=1438
Go to Top of Page
   

- Advertisement -