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?
- 7.3K All Categories
- 13 Getting Started in the Community
- 137 Beastmode & Analytics
- 1.8K Data Platform & Data Science
- 53 Domo Everywhere
- 2K Charting
- 997 Ideas Exchange
- 900 Connectors
- 236 Workbench
- 342 APIs
- 76 Apps
- 19 Governance & Productivity
- 233 Use Cases & Best Practices
- 49 News
- 473 Onboarding
- 572 日本支部