I have a data.csv file, which contains the following data. I will explain, how to insert this data into a data table.
If any row contains wrong data, the data will not insert, else the data of a row will insert into the table. Column sequence and structure must be same in both CSV and data table.
Syntax
- BULK INSERT Table_Name
- FROM 'file_path' -- F:/data.csv
- WITH
- (
- FIELDTERMINATOR = ',',
- ROWTERMINATOR = '\n'
- )
- GO

Sumit AroraPosted Aug 15, 2016, 3:07 AM
Nice share...Worked for me.
Pankaj Kumar ChoudharyPosted Aug 12, 2016, 3:03 PM
Exist on local c drive of your sql server
Pankaj Kumar ChoudharyPosted Aug 12, 2016, 3:02 PM
Hello suresh there may be many reason for this error like you don,t have permossion or columm data type mismatch b/w file and table or file not exo
Pankaj Kumar ChoudharyPosted Aug 12, 2016, 3:00 PM
Hello suresh there may be many reason of this error like file don,t exist on sql server local drive. If you are tryin
Suresh MolabantiPosted Aug 12, 2016, 9:36 AM
Cannot bulk load. The file "C:\msdos.csv" does not exist. this error is getting
Suresh MolabantiPosted Aug 12, 2016, 9:36 AM
Plz hep me
Suresh MolabantiPosted Aug 12, 2016, 9:36 AM
I am getting error