Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a layer to analyze and I want to create a thematic map with rule based feature. There is a strange behaviour. I want to find all objects with no data (NULL). All empty objects. The zero value for me is a value. I write:

namefield = ''

The result is zero but I have 47 objects with NULL value. This is an error. The strange behaviour is if I write:

namefield != ''

The result is 56 objects. This rule works. It is impossible to find objects with no data but qgis find only objects with a value.

Is this a bug or a feature?

It is a bug for me!

I use qgis 1.8

Thanks

share|improve this question

1 Answer 1

NULL is not equal to ''. That's why the query doesn't return what you are looking for.

Try

namefield IS NULL
share|improve this answer
    
namefield IS NULL is OK Thanks –  user12916 Nov 19 '12 at 16:54
    
@Lorenzo If your problem is solved, please accept the answer. –  underdark Nov 19 '12 at 17:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.