Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need help in generating a procedure Expand / Collapse
Author
Message
Posted Tuesday, April 28, 2009 12:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 28, 2009 12:00 AM
Points: 1, Visits: 0
I wanted to create a procedure which automatically sends email to people on their birthdays.
The procedure has to be scheduled in a windows 2000 server.
I am using sql server 2000. Could anyone suggest me how to do this?
The code should not ask for any inputs during runtime.
Post #705520
Posted Tuesday, April 28, 2009 6:52 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:23 PM
Points: 10,214, Visits: 13,161
This is possibly not the best solution, but it will work:

1. Get the necessary information (Name, email address) of the people who have birthday that day.
2. Loop through and send using xp_sendmail or even better go get xp_smtp_sendmail and use that.

As part of step 2 you may need to do some replacing in the body of the email if you want to insert the person's name into the email.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #705748
Posted Tuesday, April 28, 2009 7:44 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 5:59 PM
Points: 31,082, Visits: 15,529
Please post int he appropriate forum. There are forums for 2000 questions. Moving this thread.

You would need to use SQL Agent to schedule this as well.

If you read up on this and make a try and still have specific questions, we are happy to help.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #705820
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse