I have a Windows SQL Server database with a many-to-many relationship between some articles and categories, the relation is made by an ArticleCategorie
table with two columns => [ArticleID] - [CategorieID]
.
The problem now is that I have a csv file which look like this (*picture) with two columns article id and article tags (let's say the article id is 5; and that it has 4 different categories which has respectively id 1,4,6 and 7) so here is how the CSV looks like =>
|ArticleID----|Article Categories---|
|5------------|1,4,6,7--------------|
*Picture :
The best way I found was to manually add to the table all data (articles + categories) like this :
So this is above the final result that I want. Unfortunately I have more than seven hundreds articles, and can't find any faster way to import them, any solutions ? How can I import my data in a fast way? Maybe I could go for a better database design ?