Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import Text Delimited File to SQL Database?

In general I know how to import tab delimited file or comma delimited file. One of my client sent me delimited file. Example you can see below. And I don't how to import it without quotes.

"Make","Model","ModelYear","Trim","BodyStyle","Mileage","EngineDescription","Cylinders","FuelType","Transmission"
"Dodge","Stealth","1993","ES","Hatchback","107000","V-6","6-Cylinder","Gasoline",""
"GMC","Envoy XL","2003","SLE","Sport Utility","116000","6cyl","6-Cylinder","Gasoline","Automatic"

Could you guide me how to import and what settings do I need to change in order to import it with import wizard?

Thank you

like image 289
Andrew Venture Avatar asked Jun 16 '11 23:06

Andrew Venture


2 Answers

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

enter image description here

like image 53
Will A Avatar answered Sep 18 '22 15:09

Will A


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.

like image 26
Abe Miessler Avatar answered Sep 18 '22 15:09

Abe Miessler