Reputation: 19
I am new to using stored procedures I have an excel file that has few columns and data. I want to be able to read and insert the rows in respective columns in the table, but only using Stored procedures. I am using sql server 2017
Upvotes: 1
Views: 504
Reputation: 302
A way you can easily do this is to save the excel file in CSV format then using Bulk Insert in the Stored Procedure. Bulk Insert, I think, doesn't accept parameters as the file location so you might also need to write the bulk insert script as a dynamic-SQL.
Upvotes: 1