I wish to schedule the query result export to the excel sheet on SQL server. Is it possible to do that?
The query should create a new CSV or excel file and dump all the data from the query in to the sheet.
I tried
INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\contact.xls;',
'SELECT * FROM [Sheet1$]')
select * from temp1
But it requires the file to be present already.Can some one help me out ?