WorkToolFix
How to Fix Google Sheets QUERY 'Unable to Parse Query String' Error
Lab Recreated & Tested on 2026 Releases
Google SheetsVerified for: Google Sheets 2026, Chrome v134

How to Fix Google Sheets QUERY 'Unable to Parse Query String' Error

Marcus Vance
Marcus Vance(Lead Workspace Systems Engineer)
Updated: 2026-11-19
5 min read
30-Second Quick Fix
Instant Solution

If querying an array or IMPORTRANGE result inside QUERY, you must reference columns as Col1, Col2 (case-sensitive) instead of A, B. For date filtering, wrap dates in the date 'yyyy-mm-dd' literal format.

=QUERY(A2:E, "select A, B where C = 'Active' and D > 500", 0)

Why Does This Error Happen?

The Google Visualization API Query Language enforces strict SQL-like grammar. Referencing standard letters like A, B inside computed arrays ({A2:D}) or failing to wrap text strings in single quotes triggers fatal parse errors.

Step-by-Step Diagnostic & Resolution Walkthrough

1Step 1: Check Col1 vs Letter Notation

When querying direct cell ranges (A2:D), use capital letters: 'select A, B'. When querying IMPORTRANGE or curly-brace arrays ({A2:D}), use capital 'Col' followed by index: 'select Col1, Col2'.

2Step 2: Escape Text Strings with Single Quotes

All string comparisons within the query parameter must be enclosed in single quotes. Never use double quotes inside the SQL string.

=QUERY(A2:D, "select A where B = 'Completed'", 1)

3Step 3: Use Standard ISO Date Literals

Google Sheets QUERY does not accept raw serial numbers or localized dates. Format dates explicitly as yyyy-MM-dd preceded by the keyword date.

=QUERY(A2:D, "select A where C >= date '2026-01-01'", 1)

Troubleshooting Matrix & Configuration Rules

QUERY Range Types & Mandatory Column Syntax
Data Source FormatValid Column IdentifierInvalid Syntax (Causes Error)
Direct range: A2:E100select A, C, Dselect Col1, Col3 (Fails on direct range)
Computed array: {A2:E100}select Col1, Col3select A, C (Throws parse error)
Nested IMPORTRANGEselect Col1, Col2select A, B (Fails)

← Swipe horizontally to view full table →

Still Not Working? Check These Edge Cases

Scenario: Column contains mixed data types (numbers and text in same column)

Fix: QUERY assigns data type based on majority rules (over 50%). Minority data types turn into blank cells. Format the entire source column as plain text.

Frequently Asked Questions

Why does Col1 require a capital C?

The query parser treats 'col1' or 'COL1' as an unknown token. Only exact camelcase 'Col1' is recognized.