IBM PureData System for Analytics, Version 7.1

The rawtohex() function

The rawtohex() function converts a character string into the ASCII hexadecimal representation.

Description

The rawtohex() function has the following syntax:
varchar = rawtohex(varchar input);
nvarchar = rawtohex(nvarchar input, [int unicode]);

The input value specifies the varchar or nvarchar string to convert.

The unicode value converts the input data into UTF-8 or Unicode values. A value of 0 converts the input string to UTF-8 values, and a value of 1 converts the string to Unicode values. The default is 0.

Returns

For example:
select rawtohex('hello');
  RAWTOHEX
------------
 68656C6C6F
(1 row)


Feedback | Copyright IBM Corporation 2014 | Last updated: 2014-02-28