SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can you have a report mail based on when a field in a table is updated?


Can you have a report mail based on when a field in a table is updated?

Author
Message
jeffgrammer
jeffgrammer
SSC-Enthusiastic
SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)

Group: General Forum Members
Points: 119 Visits: 12
I send out a report with a subscription. But I set it up to mail out at 8:00 am daily and I would like it to mail out when the data has been updated ... sometimes at 6:00 am sometimes at 6:30 am etc.
Is that possible?
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)

Group: General Forum Members
Points: 147004 Visits: 13350
You might want to check out data alerts:

Data Alerts (SSRS)

If you control the process that updates the data, you might schedule the reports at the end of the process.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
amenjonathan
amenjonathan
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1260 Visits: 434
I've set up something similar in the past. I set up a subscription which I only wanted to fire if something failed. The way I accomplished this is to create a standard subscription then go into the job and alter the SQL statement from:

exec ReportServer.dbo.AddEvent @EventType='TimedSubscription', @EventData='829468de-eb84-4930-b9be-7b4f3b00165e'

To:

DECLARE @FieldToCheck = (SELECT FieldToCheck FROM dbo.Fields)
IF @FieldToCheck > 5 --JA: if we have sent more than 5 more orders than received back, fire off error report
exec ReportServer.dbo.AddEvent @EventType='TimedSubscription', @EventData='829468de-eb84-4930-b9be-7b4f3b00165e'


It worked like a charm.

You could use something like this, although you would need more infrastructure to get it to work because you need to capture the field at the time of change so you could test against the 'current' value.


EDIT -----------------------------------

After checking out data alerts from above, you should definitely try that first before resorting to a hack like what I've suggested. =D

-------------------------------------------------------------------------------------------------
My SQL Server Blog
jeffgrammer
jeffgrammer
SSC-Enthusiastic
SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)SSC-Enthusiastic (119 reputation)

Group: General Forum Members
Points: 119 Visits: 12
Thanks so much I'll play with this.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search