How to do Case Insensitive compare in Google Bigquery ?

Bigquery is casespecific. There is no option / setting to make it to ignore case while doing data comparison. The only option is to handle the case differences in the code by adding a LOWER() or UPPER() function.

Example:

SELECT * FROM dataset.tablename WHERE LOWER(title) = 'manager';

or if you are not sure the values are in lowercase, you can convert both the sides to lowercase to be sure:

SELECT * FROM dataset.tablename WHERE LOWER(title) = LOWER('Manager');

nVector

posted on 18 May 20

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds