NCHAR equivalent function on Teradata

Database

NCHAR equivalent function on Teradata

Is there a function that can work the same as NCHAR is SQL server or UNISTR in Oracle?

SELECT ('225'XC );  

gives me "P but in sql server NCHAR (255) results in â.

Please suggest if there is a function or UDF for this purpose.

Thanks,

Mike

 

2 REPLIES
Teradata Employee

Re: NCHAR equivalent function on Teradata

The CHR function works for numeric value input up to 255. The examples display the result in hex with char2hexint:

sel char2hexint(chr(255));

Char2HexInt(chr(255))

---------------------

FF

For Unicode values, a Unicode delimited identifier can be used:

 BTEQ -- Enter your SQL request or BTEQ command:

sel char2hexint(U&'#00FF' uescape '#');

Char2HexInt('ÿ'

----------------

00FF

Re: NCHAR equivalent function on Teradata

CHR function does not exist on the system I am using. I will try installing the oracle udf chr.