'Daily excel report creation out of MS SQL server query and then export to a file share
I have a simple task. I have a query which needs to be executed in SQL server. This will be executed daily at least once. The output of the query execution should be exported in the form of an excel sheet and placed in a file share. Format of Excel file name should be dummyExcel_dd-Mon-yy_HH:MM:SS . Every time code runs it will create a new file.
For example, consider that the query output will have following columns : EmployeeId , EmployeeName, Salary.
What is the easiest way to achieve it in MS SQL Server. I am not sure how to do it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|