Google Query - "NOT LIKE" Statement Doesn't work

IdoS picture IdoS · May 11, 2019 · Viewed 7.2k times · Source

The following line doesn't work:

=QUERY(AB:AE,"select AB,AC,AD,AE where AB NOT LIKE '%Info%'",1)

Throws:

Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "AH "" at line 1, column 26. Was expecting one of: "(" ... "("

However, this one does:

=QUERY(AB:AE,"select AB,AC,AD,AE where AB LIKE '%Info%'",1)

Answer

TheMaster picture TheMaster · May 27, 2019

NOT should be before column identifier:

=QUERY(AB:AE,"select AB,AC,AD,AE where NOT AB LIKE '%Info%'",1)