I have an old table containing dates stored as strings like '20191001'. I have created a new field of type DATE and I try to recover the old dates in the new field :
UPDATE extcg SET newdate=to_date(olddate,'yyyymmdd');
The problem is that some of these dates are invalid (20190231). I would like to skip the conversion for these dates and leave the new field NULL.
Is there a way to exclude these in a WHERE statement ?