Home Forums SQL Server 2012 SQL 2012 - General Database import from text/csv file and many to many relationship RE: Database import from text/csv file and many to many relationship

  • Only to add what Jeff suggests: there are multiple ways to skin this cat, and which one that fits you depends on a lot things. My suggestion assumes that you already know C# or VB .Net, but since you had Visual Studio in your mix, it seemed like a reasonable suggestion.

    A potential problem with Jeff's solution with using BULK INSERT is that the file must be visible from your SQL Server instance. Which is trivial, if you have SQL Server running on your own machine. But if you are working in a corporate environment, this may be more difficult to arrange. You may also encounter permission problems.

    If your main interest is in learning, I would suggest that you study both suggestions and try to implement solutions with both. In the end, you may find that one fit into your overall framework better than the other.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]