I’m an SQL beginner. Currently, I’m trying to import CSV data to a MySQL table in MAMP. I’m using the provided import function.
These are the first lines of my CSV file:
"id","stop_name","latitude","longitude" 8012713,"Rangsdorf, Bahnhof",52.294125,13.431112 8010205,"Leipzig, Hauptbahnhof",51.344817,12.381321 8010327,"Senftenberg, Bahnhof",51.52679,14.003977
The problem is the data in the latitude/longitude columns. The floats always are between 6 and 7 digits long.
I can import all rows of the CSV (33.870 entries) to the table, but only as long as I declare each column as type “VARCHAR”.
If I try to import the data as FLOAT, DECIMAL or DOUBLE, I get an error. Whether I specify the (m,n) length or not.
Any ideas anyone?