423,850 Members | 1,278 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,850 IT Pros & Developers. It's quick & easy.

Is it possible to schedule the SQL database update?

P: 1
Hi All,

We have a program which will generate output dynamically, after each minute, in excel files, the requirement is to upload these files to SQL database automatically.
Is it possible for SQL server to pick the files from a specific folder and write the database tables after each minute?

Thanks in advance.
Sep 28 '18 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,279
SQL Server comes with SQL Server Agent, you can use it to schedule jobs.
Sep 28 '18 #2

P: 1
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 tblCustomerDetails(nolock)
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0; Database=C:\Excel\Spreadsheet.xls; HDR=YES; IMEX=1',
'SELECT * FROM [Sheet1$]');

End
2 Weeks Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.