Nested UPDATE statement not populating column
I am trying to update a dataflow with MySQL. I have a report being pulled into DOMO from Salesforce and I altered it as follows:
- connected Salesforce report to DOMO
- Used ETL to filter the data into five buckets. (Marketing Channels)
- Created a new column: 'Sub Channel' - value: NULL
- Output as its own ETL dataflow
I am using SQL to update the Sub Channel Column based on which marketing channel each lead belong with. From there I want to update the Sub Channel column based on the campaign.
My code is as follows:
I had it working previously, but now I can't remember why it is not working anymore. I tried setting the Sub Channel column to empty string and NULL, but neither populate the column with values.
Comments
-
I try to avoid nesting case statements if I can.
Have you tried something like this instead?
CASE
WHEN `Marketing Channel` = '1. Event' AND `Primary Campaign`='TS-2018 HIMSS' THEN 'HIMSS'
WHEN `Marketing Channel` = '1. Event' AND `Primary Campaign`='TS-2018 MGMA' THEN 'MGMA'
... etc.
______________________________________________________________________________________________
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
______________________________________________________________________________________________0
Categories
- 10.6K All Categories
- APAC User Group
- 12 Welcome
- 36 Domo News
- 9.6K Using Domo
- 1.9K Dataflows
- 2.4K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 338 Workbench
- 250 Domo Best Practices
- 11 Domo Certification
- 460 Domo Developer
- 47 Domo Everywhere
- 100 Apps
- 703 New to Domo
- 84 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 22 お知らせ
- 62 Kowaza
- 295 仲間に相談
- 649 ひらめき共有