Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Automated querying and exporting of results.

Author  Topic 

hankyknot
Starting Member

1 Post

Posted - 2009-10-02 : 11:28:05
Hi everyone, this is my first SQL related post as I am a total noob when it comes to SQL. That being said somehow a project has ended up on my desk that requires some SQL querying and exporting.

A colleague and I have come up with a query that pulls the information we need(value x) out of a number of tables and presents it in a format that we can export to an Excel spreadsheet. That's what we have so far.

We manufacture windows and we are trying to get a report out that will give us a running total of the number of window panes produced in a day. So the query checks that the production date equals today and that the part code contains the number of window panes.

As I have said our query gives us this information in table form. Now I need to know if there is a way to automatically get these results exported to excel when the query has finished running. I would also like to have the query run automatically every 10-15 minutes so we can update the count on the shop floor.

Is this possible or is there a better way to do it?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-02 : 11:31:02
its possible. use below for exporting query results to excel

http://www.mssqltips.com/tip.asp?tip=1202

and schedule a sql agent job to execute above query and run it in frequency of 15 minutes

http://www.quackit.com/sql_server/tutorial/sql_server_agent_jobs.cfm
Go to Top of Page
   

- Advertisement -