Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 18 Jul 2012 @ 08:59:21 GMT


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


Subj:   Re: Select records with valid values except the key field
 
From:   Manti, Jayarajesh

Hi Vinod,

HASHROW(field1,field2,field3) gives 00-00-00-00 (BYTE datatype) if all the three fields are NULLs And you need to compare this with BYTE 00-00- 00-00, which is the result of HASHROW(NULL).

Here is the SQL.

     SELECT
      FAX_NB
      , SCHB_1
      , SCHB_2
      , SCHB_3
      , SCHB_4
      , SCHB_5
     FROM DATABASE.TABLE_NAME
     WHERE HASHROW(NULL) <> HASHROW(SCHB_1, SCHB_2, SCHB_3, SCHB_4, SCHB_5)

Thanks,

Jay



     
  <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