Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 27 Nov 2012 @ 12:25:06 GMT


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


Subj:   How to load Hexadecimal data
 
From:   Stieger, Etienne

Good day,

We are receiving a 16-byte hexadecimal Global Unique Identifier (GUID), represented as a 32-character string (in an ASCII load file) from our SAP system.

In other words, the incoming string looks something like this:

     4F0696EEB99C00BEE10080000AB6D16E

We would like to load this value to a Byte(16) column using Multiload, but need to find a way to do the conversion to Byte(16) on-the- fly.

With a literal string, this is easily achieved as follows:

     sel '4F0696EEB99C00BEE10080000AB6D16E'xb ;

     Result: 4F-06-96-EE-B9-9C-00-BE-E1-00-80-00-0A-B6-D1-6E


     sel type('4F0696EEB99C00BEE10080000AB6D16E'xb) ;

     Result: BYTE(16)

However, how does one do this conversion when you are referring to a column instead of a literal string?

In other words, is there an equivalent to the "xb" used on literals, which can be used with column or variable names?

Or perhaps any other technique (besides writing a UDF) that can be used.

Any advice or solution would be much appreciated.


Kind regards

Etienne Stieger
DW DBA, Technical Specialist
Analytics and Information Management (AIM/EIW)
Standard Bank



     
  <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