I am having difficulty understanding the case syntax while using magic ETL.
In the current Example, I have a list of properties and coded them to display a text column of the region for each specific property. Unfortunately, there is no address line to be able to parse and use to make the regions so I'm hard-coding the numbers.
Case when `lookup_code`= 1026 THEN "Charlotte"
ELSE WHEN `lookup_code`= 1024 THEN "Charlotte"
ELSE WHEN `lookup_code`=1020 or `lookup_code`= 1009 or `lookup_code`=1023 THEN "Raleigh/Durham"
ELSE WHEN `lookup_code`=1019 or `lookup_code`= 1010 or `lookup_code`= 1016 or `lookup_code`=3001 THEN "Dallas"
ELSE WHEN `lookup_code`=1014 or `lookup_code`=1022 or `lookup_code`=1006 or `lookup_code`=1013 THEN "Austin"
ELSE WHEN `lookup_code`=1025 or `lookup_code`=1017 or `lookup_code`=1005 THEN "Orlando"
ELSE WHEN `lookup_code`=1021 or `lookup_code`=1018 or `lookup_code`=1015 or `lookup_code`=1011 THEN "Tampa"
ELSE WHEN `lookup_code`=1030 THEN "Miami"
ELSE "New Property Please Update"
END
Or is this a alternative why to set it up
Case when `lookup_code`= 1026 THEN "Charlotte"
CASE `lookup_code`= 1024 THEN "Charlotte"
CASE `lookup_code`=1020 or `lookup_code`= 1009 or `lookup_code`=1023 THEN "Raleigh/Durham"
CASE `lookup_code`=1019 or `lookup_code`= 1010 or `lookup_code`= 1016 or `lookup_code`=3001 THEN "Dallas"
CASE `lookup_code`=1014 or `lookup_code`=1022 or `lookup_code`=1006 or `lookup_code`=1013 THEN "Austin"
CASE `lookup_code`=1025 or `lookup_code`=1017 or `lookup_code`=1005 THEN "Orlando"
CASE `lookup_code`=1021 or `lookup_code`=1018 or `lookup_code`=1015 or `lookup_code`=1011 THEN "Tampa"
CASE `lookup_code`=1030 THEN "Miami"
ELSE THEN "New Property Please Update"
END
I could use SQL to split them up but it seems redundant to split them and then join the data sets.