![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#3
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#4
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#5
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#6
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#7
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#8
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
#9
| |||
| |||
|
|
I am attempting to import a CSV file using the Bulk Insert sql command... USE datasheets BULK INSERT tblgrades FROM '\\PHS-CI-TEST\c$\book1tab.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n\r') GO The command goes, but then I hit an error. Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 2 (LocID). The first column is the primary key. the second column, the first one in my csv file, is a 6 digit number. On the table it is set to int. I can't figure out why I am getting the error when the CSV is a number and the second column, the first after the primary key, is set to int. Anyone have any ideas? Are you sure that the ROWTERMINATOR should not be \r\n? |
![]() |
| Thread Tools | |
| Display Modes | |
| |