CASE statement if else Magic ETL
Hey guys I am trying to fill a column based on certain criteria from 4 columns.
I think it would be best to do this in another column so that I'm not overwriting anything.
My table looks like the following and I'm trying a Case Statement that fills in the null spaces, but I think my case statement is missing something or I'm missing a step.
My case statement looks like this so far:
CASE when `date_created`=`date_updated` and `time_created`=`time_updated` and `publish_date` IS NULL then `date_created` else `publish_date` end
Unfortunately my case statement sucks and this doesn't work to my advantage.
Can anyone help?