In: Computer Science
bulk insert dbo.Order_
from 'C:\Users\Ulrica
Souverain\Downloads\tableconvert_csv_hlcump.csv'
with
(
DATAFILETYPE = 'char',
FIELDTERMINATOR = '|',
Batchsize = 1,
FIRSTROW = 2,
lastrow = 100,
ROWTERMINATOR = '/n',
MAXERRORS = 100
);
My sql server keeps saying 0 row affect after I tried to insert data
Hello, Student I hope you are doing good and well in lockdown.
After reading your Bulk Insert Sql syntax I can say that it is correct, but there is something unusual in ROWTERMINATOR , you have defined new line as '/n' instant of '\n' in ROWTERMINATOR Which may be cause problems otherwise your SQL syntax is correct there is no other problems.
Here is modified one Insert bulk syntax : -
BULK INSERT dbo.Order_
FROM 'C:\Users\Ulrica
Souverain\Downloads\tableconvert_csv_hlcump.csv'
WITH
(
DATAFILETYPE = 'char',
FIELDTERMINATOR = '|',
Batchsize = 1,
FIRSTROW = 2,
lastrow = 100,
ROWTERMINATOR = '\n',
MAXERRORS = 100
);
1. In case It is not working then check you have dbo.Order_ table created in your database or not.
2. And also check tableconvert_csv_hlcump.csv file that it have valid data in it or not.
3. tableconvert_csv_hlcump.csv file is presented or available at that location or not.
And believe me Now this SQL query is 100% correct there is no error in this.
And Please let me know in comment section after doing all these , it works or not because if everything is on correct mode and still you are facing this problem then this is just weired.
And Please do not forget to inform me in comment section , I am always happy to help.
Please upvote or hit that like button ,it really motivates me<3
Thank you!!
Have a nice day:)