• Blog posts

    Bio

    By David Crowther

    faq-qgis-ilike-1.PNG

    Question:

    When writing queries using the QGIS Expression Builder do I have to be careful of CASE

    Answer:

    QGIS is a little more discerning when it comes to writing your SQL queries than other desktop GIS I have used. For example if I write the query below, using a Wildcard to find all Hospitals where the value ‘harley’ is within the Address field:

    faq-qgis-ilike-2.PNG

    This returns no records.

    faq-qgis-ilike-3.PNG

    However, if I swap the LIKE operator for the ILIKE operator we now find records where the word ‘harley’ is within the address even if the value includes capital letters.

    faq-qgis-ilike-4.PNG

    A list of examples for the ILIKE operator is shown in the right box within the Expression Builder, showing you how this will work for you.