sql server - Pulling data from a SQL table -
i have intranet, sql based on end.
users submit documents intranet, set expiry on document.
there table "dbo.article" lists these documents, submitted them , when (if ever) expire. acquire info doing:
select top 999 [newsid] ,[expires] ,[headline] ,[authorid] ,[author] [article] order [expires] asc
i run, 1 time week, , email me when article expire.
what best way accomplish this?
gavin.
a couple of ways accomplish this,
option 1 - write stored procedure checking expiry , sending notification emails if necessary, there ways send emails sql server, example, link - how send email sql server?
option 2 - utilize script (vbs or powershell, again, either utilize stored procedure or plain sql query) , when status met, fire email, , more flexible , installed @ client machine (not necessary on sql server). 1 sample on how send email using vbs - http://social.technet.microsoft.com/forums/en-us/7779b3bb-dfcc-4ab3-966d-9c71d5369ad7/send-email-using-vbscript
option 3 - implement simple console app or win form app stuff in alternative 2, instead of using script.
but options require add together scheduled task on installed box run @ desired timeframe.
sql sql-server reporting
No comments:
Post a Comment