I want to create multiple excel files with data from unique query results in SQL server table.
Basically I will be creating 52 excel file with data in it
Query will be :
select * from customers where country = 'USA'
I want to export customer data for 52 countries into 52 Excel files in one go.
Are there any way to do this by running a stored procedure or function in SQL Server? Your help will be much appreciated.