I have two columns of latitude and longitude in a table with the column datatypes as string. There also some entries which are 'blank' but I think saved as a "" string.
I have had a look through the some of the similar questions here but I can't find an exact answer.
When I try to alter the column datatype I get the following error.
ALTER TABLE listings ALTER COLUMN latitude TYPE FLOAT USING latitude::float;
ERROR: invalid input syntax for type double precision: ""
I think this is because the blanks/nulls are being considered as a string "".
Whats the best way to deal with this?
Thanks