>In my opinion the SQL treatment of NULLS has a few serious flaws.
> NULL should be treated like an empty set in set algebra.
> e.g. ( column <> B ) should be true if column is NULL.
> Otherwise NOT ( column <> B ) does not equal ( column = B ).
> NULL should behave like a value that is equal to nothing and
> unequal to everything.
> I welcome your comments.
------------------------------------------------------
I see your point; however, let's look at the example of employees receiving
a commission (This comes from Oracle SCOTT/TIGER examples)
Let say we have a table as such:
EMPLOYEES
employee_nb number(5)
week-ending date
salary_am number(8,2)
commission_am number(8,2)
(I will concede my table is not normalized, but I think the point is
still valid)
Let us assume that if you are not in sales you do not have a commission.
Your commission is not zero, but rather null.
Let us say we want a list of employees whose commission for the week
is over $400, and another list of employees whose commision is less
than or equal to $400. Since commission is an illogical or not applicable
concept for non-sales people, people who aren't sales people should logically
not appear in either list. And, as I understand it, by the rules of ANSI SQL,
they would not.
----------------------------
To address your original dilemma:
One could always use a SQL clause like
where not nvl(column,'A') <> 'B'
which would be that same as
where nvl(column,'A') = 'B'
--
============================================================================
Michael Sallwasser | Down one path is utter dispair and hopelessness. Down
Northrop Grumman | the other is total destruction. Let us choose wisely.
============================================================================