Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger or DTS or What To Do

Status
Not open for further replies.

Esoteric

ISP
Feb 10, 2001
93
US
I have a table that has a date/time stamp in it. When this time expires (sort of like an auction is over) I want it to trigger an event.

I know how to write a DTS to run every 5 minutes or whatever and run a query to see if the time expired and to send the emails, but this wil run every 5 minutes. These items might only end once a week. Seems like a lot of overhead for such a small task.

So I was wondering if I can create a trigger for that time, but I see they are mostly for inserts, updates and deletes. I am not doing any of those things.

Here is an example of my select query:
Code:
SELECT QuoteID, BidClose FROM BidHeader WHERE BidClose < getdate() AND BidComplete = 0
Then I will email Purchasing, QuoteID is closed for bidding.

Any Ideas? Examples are most helpful.
 
Pretty much no. You will have to schedule something to run every minute to see which rows have expired and then take the needed action.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top