transform Hexadecimal into Binary


transform Hexadecimal into Binary


We have data in a Teradata table with a data type of VARCHAR(322) CHARACTER SET LATIN NOT CASESPECIFIC

For example, the following:

This represents hexadecimal values.
The dot, '.', in the above example represents/would be expanded to 64 zeros.
The 'X' is expanded to 16 zeros.

Need to translate this example into a binary representation and land it in another Teradata table.

Is there a UDF which would handle the transformation?

What has been accomplished so far is to use XI2 to get into a decimal format.
ie. to transform "F" , use select 'F'XI2;

Looking forward to your reply. Thank you.