Insert the content of files into a database table.
TRUNCATE TABLE dbo.tbData
GO
BULK
INSERT dbo.tbData
FROM 'D:\file01.csv'
WITH
(
FIELDTERMINATOR = ',',
FIRSTROW = 2,
ROWTERMINATOR = '\n'
)
GO
BULK
INSERT dbo.tbData
FROM 'D:\file02.csv'
WITH
(
FIELDTERMINATOR = ',',
FIRSTROW = 2,
ROWTERMINATOR = '\n'
)
GO
SELECT * FROM dbo.tbData
Comments