How can I import data from Excel to SQL Server using MS Task Scheduler
Asked
Active
Viewed 1,188 times
0
-
Google helps occasionally: https://learn.microsoft.com/en-us/sql/relational-databases/import-export/import-data-from-excel-to-sql?view=sql-server-2017#linked-servers or: https://community.powerbi.com/t5/Power-Query/best-way-to-push-data-from-excel-to-sql-server-no-of-rows-keep/td-p/107182 – droebi Oct 30 '19 at 11:36
1 Answers
0
- Create a stored procedure with Bulk Insert in SQL Server. In Bulk import query itself you can specify the file location and Table structure. Refer this link for Bulk insert
- Create a batch file and call the stored procedure using SQLCMD command. Refer this link for Example
- Task Schedule the batch file using windows task scheduler. Refer this link

Dale K
- 25,246
- 15
- 42
- 71

Shriram R S
- 126
- 4