AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Data Studio
3.6K members online now
3.6K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

LIKE SQL query not working in custom dimension for data studio

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

The following valid SQL query doesn't work, but if I change the like to = and remove the % characters it will. How can I get the like statement to work?

 

CASE WHEN Landing Page LIKE'site-section' THEN 'Section' ELSE 'Non-Section' END

 

 

1 Expert replyverified_user

Re: LIKE SQL query not working in custom dimension for data studio

Google Employee
# 2
Google Employee
Data Studio does not support all SQL functions. It does not support LIKE.

You can do this using REGEXP_MATCH instead.

For more, please see https://support.google.com/360suite/datastudio/table/6379764