Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 27 Oct 2002 @ 23:59:38 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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);



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023