Search code examples
selectgoogle-sheetsarray-formulasuppercasegoogle-query-language

How to stop upper() from being pulled through as part of Google Sheets QUERY?


I'm unable to find a way of making sure that upper() is not pulled through when using the QUERY function on Google, specifically with SELECT.

I have an example below:

=QUERY(countries, "SELECT UPPER(C)", 1)

But this outputs upper() as one of the cells. In this case the first item of the column is Continent so this pulls through as "upper(Continent)

Example Spreadsheet here

Does anyone know how to fix this so that upper() doesn't appear at all?


Solution

  • Found the answer here!

    Basically you need to label the column as nothing like so:

    =QUERY(countries, "SELECT UPPER(C) label UPPER(C) ''", 1)

    Hope this helps someone at some point as it took me a while to find!