I have a table called temperature containing 5 columns : centre date tmpmax tmpmin rrquot, date tmpmax tmpmin rrquotare stored as character varying and I need to convert them to double precision in order to manipulate them to calculate some statistics.
I used the following SQL command :
ALTER TABLE public.temperature
ALTER COLUMN "TMPMAX" TYPE double precision
USING cast("TMPMAX" AS double precision)
But it didn't work for the whole table because there are some cells that contains '' (nothing).
Concerning the date column, is there a way to cast it into date type (data are stored in this format : YYYYMMDD ex. 20030122) with YYYY-MM-DD format ex. 1968-01-13.
Please help in resolving those two problems.
DATEnot a double