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)
 trigger an autoreply

Author  Topic 

cancer192
Starting Member

10 Posts

Posted - 2008-07-20 : 21:12:15
Hi,

At specific date and time
Insert row to tbl_emailToSend

How do i achieve that? Is trigger the way forward?

Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-20 : 21:13:39
Just setup a job.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

cancer192
Starting Member

10 Posts

Posted - 2008-07-20 : 21:26:24
Will job be able to handle the following scenario?

I have tbl_In and tbl_Out. Incoming msg goes to tbl_In and receivedtime is recorded. 7hrs after the receivedtime, an auto reminder is send to remind user to log out (add row to tbl_Out).

This is to be done for every incoming msg.
The time to send the autoreply varies according to user's selection. E.g. it can be 15/30/45/60 mins before their calculated logout time or 15/30/45/60 mins after their calculated logout time.

Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-20 : 21:57:22
Setup a job that runs every minute. Have the specifics of what to do in your user table.

I don't see why you'd want to send an email to logout though. This should be done at the application layer.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -