Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 22 Dec 2007 @ 18:25:11 GMT


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


Subj:   Re: Row CheckSum
 
From:   Dieter Noeth

Bill Hassinger wrote:

  However your solution does not work in my example, all SELECTs below still return the bad character error. Where is my format error?  


CHAR2HEXINT output includes characters '0' to '9' and 'A' to 'F' and a string like '9A' can't be casted to an int.

But why don't you use Dave's suggestion? Hashrow is a kind of checksum:

     select PIcol, hashrow(col1, col2, col3, col4) from tab

Of course hashrow(1,'a') is the same as hashrow('a', 1), but

     hashrow(col1) || hashrow(col2) || hashrow(col3) || hashrow(col4)

or

     hashrow(hashrow(col1) || hashrow(col2) || hashrow(col3) || hashrow(col4))

will avoid that.


Dieter



     
  <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