Reputation: 551
I have a query that is supposed to find the occurence of a special character in UTF8.
That is my query:
SELECT key FROM workspace.table1 WHERE key CONTAINS '\u266D'
However, I get the error message "Invalid string literal".
How can I properly use UTF8 characters in my query?
Upvotes: 2
Views: 2437
Reputation: 26617
BigQuery accepts UTF8 encoded input, so you should be able to pass the utf character in your query directly, rather than using the hex code:
SELECT count(*) from publicdata:samples.wikipedia where
title contains '♭'
returns 651
Upvotes: 1