I have to calculate the sum of VARCHAR2(50 byte)
column in my Oracle database.
The SQL query is:
SELECT city, sum(forests) as sum_forests FROM BurnedAreas GROUP BY city
The column forests
has datatype VARCHAR2(50 byte)
I've tried already some functions but they didn't work:
TO_NUMBER()
CAST()
I believe the problem is that the values of the specific column have different format. Some values are like 5.37, others like 14,23 etc.
Does anyone have any solution?