Wednesday, August 16, 2017

Load bulk data to sql server via csv file

--Table1

DELETE  FROM [dbo].[Table1]
GO

BULK INSERT [dbo].[Table1]
FROM 'C:\subrat\Table1.csv'
WITH(FIRSTROW = 2 ,FIELDTERMINATOR=',', ROWTERMINATOR='\n')
GO

SELECT *  FROM [dbo].[Table1]
GO


No comments:

Post a Comment

Encrypt/Decrypt the App.Config

Program.cs using System; using System.Diagnostics; using System.IO; namespace EncryptAppConfig {     internal class Program     {         pr...