<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>SQLite, which is the underneath database engine for GeoPackage,
      doesn't support ILIKE. The SQLite LIKE operator is actually case
      insensitive for ASCII characters. See paragraph 5 "The LIKE, GLOB,
      REGEXP, and MATCH operators" of
      <a class="moz-txt-link-freetext" href="https://www.sqlite.org/lang_expr.html">https://www.sqlite.org/lang_expr.html</a><br>
    </p>
    <div class="moz-cite-prefix">Le 28/07/2021 à 21:43, C Hamilton a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CABPxTTrLm=mqc_woB-SAQ12DT94eW2CANExhzhUb0MY5TqGTSg@mail.gmail.com">
      <div dir="ltr">I think I found a bug and was wondering if someone
        could verify this. I am on Windows 10 and tried this with both
        QGIS 3.16.9 and 3.20.1.
        <div><br>
        </div>
        <div>I tried the following filter expression on the Natural
          Earth data set ne_10m_populated_places (<a
href="https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip"
            moz-do-not-send="true">https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip</a>).
          Once loaded into QGIS right mouse click on the layer and
          select "Properties...", then click on the "Source" tab, click
          on "Query Builder" and then use this query
          <div><br>
          </div>
          <div>"NAME" ILIKE '%Bom%'<br>
          </div>
          <div><br>
          </div>
          <div>This works fine. If I export ne_10m_populated_places as a
            GeoPackage and try the same thing with the GeoPackage
            version of the layer, I get the error:</div>
          <div><br>
          </div>
          <div>"An error occurred when executing the query, please check
            the expression syntax."</div>
        </div>
        <div><br>
        </div>
        <div>If I use LIKE instead of ILIKE then it works. It is like
          ILIKE was not implemented for GeoPackage. Can anyone verify
          this? I think you can use any vector layer for this test with
          one that is a shapefile and the other a GeoPackage.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div><br>
        </div>
        <div>Calvin</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>