'Query string starting with zero (0) returns non desired values
I have a QUERY and, above it, I have some cells that, when filled, add conditions to the QUERY. As my formula is today:
" and lower(Col4) contains '"& D11 & "'"
In that case from the image, when I fill the "Nº PP" filter on D11 (which is usually a string of numbers), when I type something that starts with a zero (like "040222", the case from the image) it returns everything that contains "40222".
I get zero results if I change the formula to:
" and lower(Col4) = '"& D11 & "'"
Every other case when it doesn't start with a zero, it queries correctly. Is there a way to fix it?
Solution 1:[1]
it should work if you use regex:
"and lower(Col4) matches '"&TO_TEXT(D11)&"'"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | player0 |

