BULK INSERT CSV OR TEXT FILE TO SQL TABLE


Run following script to load all the data from CSV to database table. If there is any error in any row it will be not inserted but other rows will be inserted.
BULK
INSERT 
CSVTest

FROM 'c:\csvtest.txt'
WITH(
FIELDTERMINATOR ';',
ROWTERMINATOR '\n')
GO

--Check the content of the table.
SELECT FROM CSVTest

GO

For more details click here

Keep ur coding aside.. Relax for some time..