1.change from char to hex
select char2hexint('A')
2.change from hex to char
select (x'0041')
3.trim the x'0000' in a string( x'0000' is hex representation of the end of the line )
TRIM(TRAILING _UNICODE '0000'xc FROM CMPGN_ID)
4.http://developer.teradata.com/blog/dnoeth/2012/10/how-to-simplify-your-statistics-collection-with-a-queue-table