Question

In: Computer Science

bulk insert dbo.Order_ from 'C:\Users\Ulrica Souverain\Downloads\tableconvert_csv_hlcump.csv' with ( DATAFILETYPE = 'char', FIELDTERMINATOR = '|', Batchsize =...

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

Solutions

Expert Solution

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:)


Related Solutions

[ Write in C, not C++] Define a function char* deleteSymbol(char *s, char x) that removes...
[ Write in C, not C++] Define a function char* deleteSymbol(char *s, char x) that removes the character x from string s. For s[] = “America”, a call to deleteSymbol(s, ‘a’) converts s[] = “Ame”
How to generate database diagram for a database that stores information about the downloads that users...
How to generate database diagram for a database that stores information about the downloads that users make. Each user must have an email address, first name, and last name. Each user can have one or more downloads. Each download must have a filename and download date/time. Note: I want steps on how to generate this diagram using oracle SQL developer Each product can be related to one or more downloads. Each product must have a name.
Implement stack in C Struct: struct patients{ int id; int severity; char *firstName; char *lastName; char...
Implement stack in C Struct: struct patients{ int id; int severity; char *firstName; char *lastName; char *state; int time_spent; }; Given Array: struct patients* patientsArray[4] = {&p1, &p2, &p3, &p4}; Create two functions one for pushing this array to the stack and one for popping the variables such as p1 p2 p3 p4 by its ID
Write in C programming language Write the function replace(char b[], char f[], char t[]). which finds...
Write in C programming language Write the function replace(char b[], char f[], char t[]). which finds the string 'f' in the string 'b' and replaces it with the string 't'. You can assume that f and t same length Example: char string[] = "zap";     replace(string, "ap", "oo"); --changes 'string' to "zoo".     *don't assume substring being replaced is singular, or that its own substrings are unique.     *Don't re scan letters already checked and replaced         char string[] =...
What is the output from the following program? Explain your results. file:///Users/brianabernal/Downloads/Question%201.pdf int val = 20;...
What is the output from the following program? Explain your results. file:///Users/brianabernal/Downloads/Question%201.pdf int val = 20; int func1() {     int val = 5;     return val; } int func2() {     return val; } int main() {     // (1)     cout << func1() << endl;     // (2)     cout << func2() << endl; }
The chart is here. file:///C:/Users/tyler/Downloads/Standard%20Normal%20Table%20(1).pdf 1.      Find the area under the normal curve that is: greater than...
The chart is here. file:///C:/Users/tyler/Downloads/Standard%20Normal%20Table%20(1).pdf 1.      Find the area under the normal curve that is: greater than Z = 0.64 2.      Find the area under the normal curve that is: below Z = -1.53 3.      Find the area under the normal curve that is: greater than Z = -1.89 4.      Find the area under the normal curve that is: below Z = 2.27 5.      Find the area under the normal curve that lies between: Z = 0.00 and Z = 0.85 6.      Find the area under...
Use a powershell script to bulk create 10 users (sales1, sales2, ...) inside OU=MyBusiness, OU=Users, OU=Sales,...
Use a powershell script to bulk create 10 users (sales1, sales2, ...) inside OU=MyBusiness, OU=Users, OU=Sales, save script to desktop
Translate the following C++ program to Pep/9 assembly language. const char chConst = '+'; char ch1;...
Translate the following C++ program to Pep/9 assembly language. const char chConst = '+'; char ch1; char ch2; int main() { cin.get(ch1); cin.get(ch2);    cout << ch1 << chConst << ch2;    return 0; }
*Answer in C program* #include <stdio.h> int main() {      FILE *fp1;      char c;     ...
*Answer in C program* #include <stdio.h> int main() {      FILE *fp1;      char c;      fp1= fopen ("C:\\myfiles\\newfile.txt", "r");      while(1)      {         c = fgetc(fp1);         if(c==EOF)             break;         else             printf("%c", c);      }      fclose(fp1);      return 0; } In the program above which statement is functioning for opening a file Write the syntax for opening a file What mode that being used in the program. Give the example from the program Referring to...
write C program to implement the priority queue with the operation insert
write C program to implement the priority queue with the operation insert
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT