I am trying to import a CSV file in SQL Server 2008. BULK INSERT
is a way to go but it is applicable for CSV from SQL Server 2014 onwards.
What would be an alternative way to achieve this goal?
Any thoughts/ideas much appreciated.
csvimportsql serversql-server-2008
I am trying to import a CSV file in SQL Server 2008. BULK INSERT
is a way to go but it is applicable for CSV from SQL Server 2014 onwards.
What would be an alternative way to achieve this goal?
Any thoughts/ideas much appreciated.
Best Answer
SQL Server has always supported bulk inserting from CSV files, you just have to specify field/row terminators.
file.csv contains:
Then we do this:
Results: