Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Cast CHAR/VARCHAR to VARBYTE - forum topic by veskojl

$
0
0

Is there a way to convert string data into varbinary data type. I want to use the BYTE/BIT manipulation functions on a string column, but they can recieve only BYTEINT,INT, BIGINT and VARBYTE data types as arguments.
I tried this kind of cast:

SELECT CAST (CHAR2HEXINT('ABCDE') AS BIGINT);

but this has limited functionality, because the maxlenght of the string.
Any idea how to avoid this?
Basically I want achieve that:

SELECT *
FROM TABLE
WHERE BITOR('STRING','MASK'XBV) = 'SOMETHING'XBV;

 
P.S. I've just got lost into Teradata data types and casting !?

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>