You can easily achieve this thing by following below steps.
USE Sample
GO
CREATE TABLE Employee
(Id INT,
FirstName VARCHAR(40),
LastName VARCHAR(40),
Designation VARCHAR(40),
BirthDate SMALLDATETIME)
GO
2. My Source Data in CSV file looks as per below and I have created it in C:\Employee (CSV).
3. Use below script to import CSV Data into SQL Employee Table.
BULK
INSERT Employee
FROM 'c:\Employee (CSV).txt'
WITH
(
FIELDTERMINATOR = ',', --CSV field delimiter
ROWTERMINATOR = '\n' , --Use to shift the control to next row
TABLOCK
)
GO
After Executing above script:
Please let me know any update in above script.
Thank you.