You have something, you don't have something or its null!
Ok today we found out a nicely little bug in the code of our system, a clause in the oracle database where it did a not equal to on two fields.
So for example:
FieldA = 1 FieldB = 1
then FieldA <> FieldB = False then FieldA = FieldB = True
FieldA = 1 FieldB = 2
then FieldA <> FieldB = True then FieldA = FieldB = False
FieldA = null FieldB = 2
then FieldA <> FieldB = False then FieldA = FieldB = False
FieldA = 1 FiledB = null
then FieldA <> FieldB = False then FieldA = FieldB = False
FieldA = null FiledB = null
then FieldA <> FieldB = False then FieldA = FieldB = False
So always remember to insert logic for null values especially in Oracle, apparently SQL Server handles this differently.
Just placed this here as a reminder.


There are no comments for this entry.
[Add Comment]