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

Add NULLIF expression function [FEATURE] #8809

Merged
merged 2 commits into from
Jan 8, 2019

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Jan 8, 2019

Allows for substituting values with NULL if they match another value.

Substitute '(none)'

name nullif("name", '(none)')
'' ''
'(none)' NULL
'Jack' 'Jack'
NULL NULL

Substitute '' (empty string)

name nullif("name", '')
'' NULL
'Jack' 'Jack'
NULL NULL

@m-kuhn m-kuhn force-pushed the expression_nullif branch from 465b7f1 to af027d9 Compare January 8, 2019 10:03
Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@m-kuhn m-kuhn merged commit dd0b33e into qgis:master Jan 8, 2019
@m-kuhn m-kuhn deleted the expression_nullif branch January 8, 2019 13:12
@qgib qgib mentioned this pull request May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants