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 |
|
tm555
Starting Member
5 Posts |
Posted - 2008-02-14 : 05:40:27
|
| Hi, I have the table likeId Pickuptime 1 2008-02-14 13:07:06.317If the record is inserted to the above table that would look at a pickuptime field in a table and if pickuptime is 2008-02-14 13:07:06.317 after 6 hour from the pickuptime then I would send a email to briteindia_kumar@hotmail.com How i would do this would any one help to me. Thanks kumar |
|
|
dewacorp.alliances
452 Posts |
Posted - 2008-02-14 : 06:07:51
|
| Something like this ... change the day to hour. Check out BOL.CREATE TABLE #temp( DateSTAMP smalldatetime)INSERT #temp(DateSTAMP) VALUES ('2008-02-11')INSERT #temp(DateSTAMP) VALUES ('2008-02-12')INSERT #temp(DateSTAMP) VALUES ('2008-02-13')INSERT #temp(DateSTAMP) VALUES ('2008-02-14')--select * from #tempselect * from #temp where GETDATE() >= DATEADD(day, 2, DateSTAMP)DROP TABLE #temp |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
|
|
|
|
|