How to import Text Delimited File to SQL Database? How to import Text Delimited File to SQL Database? sql-server sql-server

How to import Text Delimited File to SQL Database?


You need to set the "Text qualifier" to ".

enter image description here


People might say it's a bit krufty, but the easiest way might be to open it as a CSV in excel and then copy/paste it right into your table using Management Studio.

If you are trying to do anything fancier than that, this method won't work. If not, you would be hard pressed to find a faster way to do it.


If the data is very simplistic you can use the SSMS import wizard. Right click the database, select tasks, select Import Data, and has been pointed out identify quotes as the text qualifier.

For a csv, tab delimited file you would change Data Source option to: Flat File Source

From there just answer the questions and follow the prompts.

I will warn you however. Unless the data is very simplistic, this method tends to produce a lot of errors. I almost always end up using SSIS which is a little more hassle and complex but a whole lot more powerful and dependable.