Archives of the TeradataForum
Message Posted: Tue, 07 Sep 2004 @ 15:34:26 GMT
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
|