SSMS 2012 automatically run and export to xls


I'm brand new to the forum and extremely green when it comes to SQL, I'm
using SSMS 2012. I have multiple queries that are run daily(I also have
a few that are run every Monday) that I want to schedule to run at
midnight and export to a new xls file on the network drive to be used
the next morning. Is there something that I can add to each query to
accomplish this or would I have to set something else up to call the


You can create an SSIS package to do the export, but you can also use T-SQL to do it. Regarding running them automatically, you would schedule the SSIS package or T-SQL script as a SQL Agent job.

Here's how to do the export in T-SQL: