0

When I query =Query(A:B;"Where B ends with 'HDD laptop 2.5''inch'";0), it will fail, because there's a '' . Is there a way to still query with single quotes? Sometimes I need to query column BY, but QUERY understands Column BY as by.

JPV
  • 26,499
  • 4
  • 33
  • 48
Leti
  • 111
  • 1
  • 8
  • 1
    perhaps here you can find the answer https://stackoverflow.com/questions/53864405/how-can-i-escape-double-and-single-quotes-in-google-sheets-query?r=SearchResults – Sergey Jun 01 '21 at 03:40

1 Answers1

2

Try

  =Query(A:B,"Where B ends with ""HDD laptop 2.5''inch""",0)

and see if that works?

EDIT: if you want to query column BY you'll have to use back quotes around BY (because BY is a reserved word in the query language).

Example:

...where `BY` ends with ...
JPV
  • 26,499
  • 4
  • 33
  • 48