Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 29 May 2013 @ 15:40:35 GMT


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


Subj:   Re: BYTE Conversion to DECIMAL(18)?
 
From:   Geoffrey Rommel

  I need to convert up to a 20 character alphanumeric value to a numeric 18 digit number.  


As you know, Teradata SQL has a limitation that (in most cases) BYTE cannot be converted to any other data type. Therefore a UDF is probably your best bet. Sample UDF's are available in many places, including the teradataforum Web site.

In theory,?20 bytes can have 256^20 = 1.46E48 possible values. Even if they're all letters and digits, the number is 36^20 = 1.3E31. Some ingenuity may be needed to make sure that the result fits into 18 digits.



     
  <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