As per topic header, is it possible to Include t-ql query result set in notfication email ?

For example:

select * from table1 where condition = x

The monitor prob triggers an alert on any records found. Count > 0. Notification is delivered by email. Is it possible to include the query result in the notification email ?

(I understand this is not the best use of a COUNT trigger as values are ZERO or massive).

Thank you. Scott


Article Comments

Dear Scott,

you can enter the query into the Comments-tab of the sensor and then use the placeholder %comments in the notification to send it out as well.

best regards.


Jul, 2011 - Permalink

Thank you for the reply.

I selected the SENSOR Select the COMMENTS tab Added the QUERY and saved Loaded SYSTEM & WEBSITE Added the value %comments to the footer. Created an alert

Resutling email contains "select * from table1 where condition = x" in the COMMENTS section and "select * from table1 where condition = x" in the footer.

Is there are way to display the query RESULTS as opposed to the T-SQL statement itself.

Thank you Scott


Jul, 2011 - Permalink

Have also tried added EXEC usp to the COMMENTS tab


Jul, 2011 - Permalink