troubleshooting Question

How to Email Sql query results?

Avatar of Ricky White
Ricky WhiteFlag for United States of America asked on
Microsoft SQL ServerC#Visual Basic.NET
2 Comments1 Solution664 ViewsLast Modified:
Environment: Sql server 2000, C#, VB.Net

I would like to run a sql query and send the results of that query to an email address in the body of the email.

**************************************************************
Sql:
Select count(books)
from Authors
where published >= getdate()-7

Email:
The number of books published this week = (the result from SQL query)

**************************************************************

I would like to automate this task so somebody doesn't need to run it every week.

Please advise how can this be programmed?

Thanks.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros