I have a dataset of city names with corresponding latitudes / longitudes that I loaded into a MySQL table, for example:
city_id | city_name | Latitude DECIMAL (9.6) | Longitude DECIMAL (9.6)
Typical latitude / longitude coordinates might look like this: 54.284758 / 32.484736.
However, I get values ββwith a scale of 2 to display correctly in my table, in other words, the equivalent of DECIMAL (5,2). Data is downloaded from a text CSV that has been exported from OpenOffice Calc for UTF-8 purposes. I know that OpenOffice has some problems with decimals, but the full latitude / longitude is definitely in the exported CSV. If I open CSV using Notepad, the data will be accurate.
Can anyone see what I can do wrong?
Thanks.
UPDATE: Got it working, thanks for all the input. I recreated everything from scratch, a new schema file (I use ORM), a new CSV export, a new table, a new LOAD DATA INFILE and it works with the correct decimal output. It hits me.
decimal mysql latitude-longitude load-data-infile
Tom
source share