16

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)
2
  • 2
    What does "not work" mean? I suspect that it merely doesn't do what you expect, because you don't fully understand how it works. Commented May 11, 2019 at 18:49
  • Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " <ID> "AH "" at line 1, column 26. Was expecting one of: "(" ... "(" ... Commented May 12, 2019 at 19:43

2 Answers 2

29

NOT should be before column identifier:

=QUERY(AB:AE,"select AB,AC,AD,AE where NOT AB LIKE '%Info%'",1)
Sign up to request clarification or add additional context in comments.

Comments

3

Probably column AB is nullable:

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

The Three-Valued Logic of SQL

AB + (NOT AB) + (NULL in column AB) <=> entire set

1 Comment

Tried this:=QUERY(AH:AK,"select AH,AI,AJ,AK where AH NOT LIKE '%Info%' OR AH IS NULL",1) and still getting this error: Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " <ID> "AH "" at line 1, column 26. Was expecting one of: "(" ... "(" ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.