Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 07 Sep 2004 @ 15:34:26 GMT


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


Subj:   Re: Converting HEX to ASCII
 
From:   Dennis Calkins

On Tue, 7 Sep 2004 10:52:41 -0400, John Hall wrote:

  Using the 'hashbucket' function, Dieter showed a REALLY simple method for converting hex to a decimal value.  


HASHBUCKET is only defined for Values < 65536 since it's purpose is to return the UPPER 2 bytes of the ROWHASH.

Teradata only support 65563 hashbuckets. Values > 65536 will be truncated and only return a Value which is MOD 65536.

     SELECT HASHBUCKET('07D307D3'XB (BYTE(4)));

      *** Query completed. One row found. One column returned.
      *** Total elapsed time was 1 second.

     HASHBUCKET('07D307D3'XB)
     ------------------------
                         2003


     
  <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