Home > DeveloperSection > Forums > How to import csv file data in SQL server table?
Tanuj Kumar

Total Post:134

Points:940
Posted on    March-24-2012 2:01 AM

 MSSQL Server MSSQL Server 
Ratings:


 1 Reply(s)
 2356  View(s)
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!!


Arun Singh

Total Post:68

Points:476
Posted on    March-26-2012 1:27 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick