CHR function fails

Database
Enthusiast

CHR function fails

I'm trying to use the CHR function.  Using the syntax:

SELECT CHR(66);

I get an error message "SELECT Failed 3706: Syntax error: expected something between '(' and the integer '66'.

I assume there is some sort of configuration issue involved, but I have no idea how to begin to diagnose where the problem is.

Any ideas?

TIA,

Nolan

4 REPLIES
Enthusiast

Re: CHR function fails

Are you using TD14?

Enthusiast

Re: CHR function fails

Hi,

This quesry is running fine at my end both at Bteq and SQL Assistant, and I have checked it at bother versions (13.10 & 14).

Can you please paste the actual query you are trying to run in your script?

further, You can refer to this post, it might help you: http://forums.teradata.com/forum/database/tab-in-column

Khurram
Enthusiast

Re: CHR function fails

Teradata does not have CHR by default, your DBA has to install it for you. This is the error message you will get if you do not have CHR installed.

Teradata does have an equivalent though, it uses Unicode characters.

You can perform the same function as:

CHR(66)

which would be "B", by using the following:

'42'xC

Unicode character 0042 = "B"
Enthusiast

Re: CHR function fails

My apologies to those who responded to my query.  I was relying on the forum's email notification funtion to tell me someone had responded to my question.  I didn't receive an email on this post.

Now I don't even remember where I was running into the problem.  I know I've addressed the issue, but I don't remember what my solution was.  Sorry.

Nolan