You can create a scheduler in User Agent.
Exec usp_exportdata
it will automatically replace previous data in Excel file.
Create proc usp_exportdata
As
Begin
SELECT * INTO tblCustomerDeta ils(nolock)
FROM OPENROWSET('Mic rosoft.ACE.OLED B.12.0',
'Excel 12.0; Database=C:\Exc el\Spreadsheet. xls; HDR=YES; IMEX=1',
'SELECT * FROM [Sheet1$]');
...
Leave a comment: