0 - 3 of 3 tags for TO_BYTES

Hi Teradata experts, I'm trying to write a query that selects a varchar column - which contains a valid hexidecimal character string - and converts it to it's byte representation.
So if I have the character string "FF" it will convert it to a byte value FF.

Hi,
I need to convert hexadecimal value to a decimal value. FOr that purpose, I have created the following query.
SELECT ZEROIFNULL(CAST(FROM_BYTES( TO_BYTES('0' || SUBSTR(col_a ,9,5),'base16'),'base10') AS INT)) AS col_A_dec FROM table_a

Hi,
I need to convert hexadecimal value to a decimal value. FOr that purpose, I have created the following query.
SELECT ZEROIFNULL(CAST(FROM_BYTES( TO_BYTES('0' || SUBSTR(col_a ,9,5),'base16'),'base10') AS INT)) AS col_A_dec FROM table_a