Archives of the TeradataForum
Message Posted: Mon, 27 Oct 2002 @ 23:59:38 GMT
Subj: | | Re: Compare null with integer |
|
From: | | McCall, Glenn D |
This is very similar to a question asked a few weeks ago. I gave a much longer answer then, perhaps you could search the archives for
more detail.
The short answer is that NULL doesn't equal anything. It also doesn't not equal anything. Any conditional expression involving null will
always be false.
You could try writing your query like this.
Sel a.acct_id,b.acct_type
From a, b
Where a.acct_id = b.acct_id
and (a.acct_type <> b.acct_type OR a.acct_type is null OR b.acct_type is null);
|