1

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

3
  • A simple internet search will find many, many discussions of importing information from excel files. Commented Apr 2, 2019 at 13:51
  • Import data from Excel to SQL Server or Azure SQL Database. That said, I'm voting to close this question as too broad. Commented Apr 2, 2019 at 13:52
  • @SMor i posted this question after intensively searching..... also i wanted to know how to resolve my query using only stored procedures... i found many that used mvc, c# interface to achieve the task but i found none that did the same with only stored procedures Commented Apr 4, 2019 at 5:47

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.