I'm trying to add the date in a case statement
select the_date,
(case
when the_date like '%years%' then dateadd(year,REPLACE(REGEXP_SUBSTR(condition_, '-?[0-9]+\.? years'),'years',''),the_date)
end)
from customer
But I'm getting the following error:
SQL Error [500310] [42883]: Amazon Invalid operation: function pg_catalog.date_add("unknown", text, timestamp with time zone) does not exist;
Can anyone help please?