I have a following problem. I have a .tsv
file (for movies, years and genres). I want to upload it to SQL Server 2012.
I created a table
CREATE TABLE Genres2
(
MovieName varchar(255) NOT NULL,
Year int NOT NULL,
Genre varchar(255) NOT NULL
PRIMARY KEY (MovieName, Year)
);
While uploading it
BULK INSERT Genres3
FROM 'c:\Users\genres6.tsv'
WITH
(
FIELDTERMINATOR='\t',
ROWTERMINATOR='\n'
);
I get an error
The duplicate key value is
But notepad++ says, that there is only one such value in the file.
Any ideas how to solve it? Thank you in advance.