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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-04-27 : 09:04:09
|
| prabu writes "how to Create a stored procedure to trigger email to a list ofusers to remain them that their message isgoing to be inactive state in next 5 days. The SQL should takeall the messages that are 25 days old user's. How to check this?can any one help me in this. The date which the message posted is in string datatype." |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-04-27 : 09:38:53
|
| Can you give us more information on this? What is your table structure? What does the data look like?You can use a SQL Server job to execute a query every day. The query can then use xp_sendmail to send mail to the appropriate people.It's generally recommended that email be done from the application. You can use a SQL Server query to determine who you need to email and what the message needs to be. You would then have an email component that would email the appropriate people. Make sense?If you decide to do it in SQL Server, post the structure and some sample data.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|