May 28, 2009 at 8:09 am
Hello,
How do you save the results to a HTML file from a scheduled query in SQL Server Agent in SQL 2005?
I have a scheduled job that does a simple query; the job runs once a day all it does is:
SELECT * FROM table1.defects
I am trying to figure out how to save the results to a HTML file on local drive c:. I have looked in Books Online, and have searched the web but have not seen anything that can be done through a query in SQL Server Agent.
My guess is I am going about this totally wrong. Can someone please suggest what I should be using.
Thank you.
May 28, 2009 at 12:46 pm
Conversion to html format usually is done by a frontend application.
What you could look into is XQuery to save the data in XML format.
May 28, 2009 at 1:04 pm
Here is a thought - create a report in Reporting Services. Schedule the report to be run and delivered every day by email in HTML format.
You can either have that included as an attachment, or embedded in the email. If it just has to be created in a folder, that can be done also.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 1, 2009 at 2:46 pm
thank you, I will give Report Server a go.
June 1, 2009 at 8:53 pm
Well - You can use SQLCMD command line utility and pipe the results to a File. ;-). Might be easier
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply