Reputation: 2135
I'm using sql server 2008. I have a database "CustomerManagement", and a table "Customer" like this:
CustomerID | Name | Money
1 | Paul | 300
2 | Mary | 250
3 | David |
4 | May |
5 | Ann |
And I have an excel file, with some data as the following:
CustomerID | Money
3 | 100
4 | 150
5 | 175
How I can insert "Money" in excel file to sql server based on CustomerID?
I'm using winform C# and MS Excel 2010
Upvotes: 0
Views: 6587
Reputation: 6079
Retrieve all the data from Excel which you want to insert to sql Database and then loop it and insert to sql server.
Upvotes: 1