Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same SQL expression behaving differently #21901

Closed
qgib opened this issue Nov 25, 2015 · 3 comments
Closed

Same SQL expression behaving differently #21901

qgib opened this issue Nov 25, 2015 · 3 comments
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

Comments

@qgib
Copy link
Contributor

qgib commented Nov 25, 2015

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


@qgib
Copy link
Contributor Author

qgib commented Nov 25, 2015

Author Name: Sebastian Dietrich (Sebastian Dietrich)


What type of layer is this (postgres, spatialite, ...)?

@qgib
Copy link
Contributor Author

qgib commented Nov 25, 2015

Author Name: Paolo Cavallini (@pcav)


shapefile (dbf)


  • subject was changed from Same SQL xpression behaving differently to Same SQL expression behaving differently

@qgib
Copy link
Contributor Author

qgib commented Nov 25, 2015

Author Name: Jürgen Fischer (@jef-n)


duplicate of #16352


  • resolution was changed from to duplicate
  • status_id was changed from Open to Closed

@qgib qgib added 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 labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant