Follow

Why it is better not to use "Exclude" wirth clause "equal to" in groups?

In one of its groups, one client excluded some records with clause "equal to".
So basically the strange thing is that if you create a group with City = 7 or City = 3 and you add a condition "exclude" city = 7 then you won't find back the exact number of City = 3. It's not a really intuitive result! But there's a logical reason for it.
From the point of view of SQL DB, when a field is "NULL" as there can be in any DB, it is counted as "I don't know, it can be anything" not as "empty".
So when you "eclude City=7", the system also counts the "NULL" values because in SQL it means "it coulbe be, I don't know".
So the trick is not to use "Eclude City=7" but rather "Include City different than 7" and all will be fine.

0 Comments

Please sign in to leave a comment.