If contains statement beast mode

Reply
Yellow Belt

If contains statement beast mode

I essentially have a list of URLs in one column and need to extract out the advertiser into a new column. I want to use an if contains statement to search every row in data set and see if it holds the pertaining advertiser name. Below is what I what both columns to look like and the code that I tried. 

 

COL.a     COL.b

url            Advertiser name

 

CASE
WHEN `Page` LIKE '%adCREASIANs%' THEN 'By Gina'
WHEN `Page` LIKE '%Aerovex SystemsInc%' THEN 'Hemp Beauty'
ELSE 'NA'
END;


Accepted Solutions
Orange Belt

Re: If contains statement beast mode

remove the ; at the end of the syntax 

 

case when `url` like '%goo%' then 'google'

when `url` like '%adCREASIANs%' THEN 'By Gina'

when `url` like '%Aerovex SystemsInc%' THEN 'Hemp Beauty'

else 'na' end

View solution in original post


All Replies
Orange Belt

Re: If contains statement beast mode

remove the ; at the end of the syntax 

 

case when `url` like '%goo%' then 'google'

when `url` like '%adCREASIANs%' THEN 'By Gina'

when `url` like '%Aerovex SystemsInc%' THEN 'Hemp Beauty'

else 'na' end

View solution in original post

Announcements
Check out these great solution videos! The new iSolveditWithDomoboard is live, share yours and earn higher rankings in Dojo click here!