문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top