How to upload CSV file into SQL Server

1149570 pts.
Tags:
CSV file
SQL Server
I have a very large CSV files and it needs to be uploaded into SQL Server using C#. How can I do that? It has thousands of rows / roughly 20-30 columns. Thanks so much.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here is a link explaining it in detail

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    The link in the answer wiki shows how to do it using management studio, but if you want to do it by code, you could open the file and read it into a datatable and then use the datatable to perform a bulk insert into the database table.
    85,025 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: