How to import csv file data in SQL server table?

Total Post:134

Points:940
 3003  View(s)
Ratings:
Rate this:
Hello Guys,
I'm facing a problem since last night, please help me! Actually I want to import csv file data in sql server database but I didn't. Could you explain it with code?

Please reply as soon as possible. Thanks in advance!!
  1. Post:68

    Points:476
    Re: How to import csv file data in SQL server table?

    Hi Tanuj Kumar,
    To import data from csv file in SQL Server, you have to use BULK Query Command. Let's take look of Bulk Query Command query.

    Query:  

    BULK INSERT tbl_Name
                   FROM 'csvFileNamewith Path'
                      WITH
                         (
                            FIELDTERMINATOR = ','
                         )
    I hope it might be resolve your problem.

      Modified On Mar-29-2018 05:08:30 AM

Answer