Same SQL expression behaving differently #21901
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Expressions
Related to the QGIS expression engine or specific expression functions
Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 13878
Affected QGIS version: 2.12.0
Redmine category:field_calculator
The same query:
"highway" ILIKE '%foot%' and not "man_made" ilike ‘%pier%’
returns 0 records when used in the field calculator, hundreds (in our case) when in the layer filter.
To obtain the same result in the field calc one should modify the expression as follows:
"highway" ILIKE '%foot%' and("man_made" is null or not "man_made" ilike '%pier%’)
So, apparently NULLs are handled differently. The behaviour of the filter is more understandable for the end user; in any case, this inconsistency does not appear good.
Related issue(s): #16352 (duplicates)
Redmine related issue(s): 7380
The text was updated successfully, but these errors were encountered: