Link to home
Start Free TrialLog in
Avatar of mmanju
mmanju

asked on

chr function

When using the chr function on values 127 and beyond, it appears to return only one value, as if the last char in the character set is 127. This is happening on a HP-UX running an Oracle 8.0. However, it gives a different result when tried with an aix system on oracle 8.0 [ I can go all the way upto 255 ]. I believe this has nothing to do with the oracle and unix system, but some setup for oracle is making this. Can you please tell me what is that setting that I am missing?

Thank you
Avatar of sudhi022299
sudhi022299

chr function will return the character according to your database character set or according to the nls character set.

try finding out the values what values have been set to these parameters.

 Hi mmanju,

 I think this depends on two things
 (1) The operating system - the character set
       supported by it.
 (2) The front end used to execute the query,
       for example sqlplus, or plus33w...

 - Vish
Avatar of mmanju

ASKER

Thank you for your answers. Is there any way of finding the nls_character_set in oracle? I tried looking for all entries where name  like '%nls%' under v$parameter, but could not find anything that said nls_character_set. Is there any other place where I can find it?

Also, any unix command for finding the character set?

Any help would be appreciated.

Thank you
It's in v$parameter and is called nls_language.

-Brad
Avatar of mmanju

ASKER

Its set to AMERICAN in both systems and nls_territory is set to AMERICA, but both behave differently.

Any ideas?
Normally only the first 128 characters are usually used. The next 128 chratcters are called as extended characters and are only used by some east asian languages (eg. japaneese).
Avatar of mmanju

ASKER

Thank you for that. But, my question is what setting is making one system of same oracle version be able to use all 255 characters and other use only first 127 of the same. Any suggestions would be greatly appreciated.

Thank you
Is there any possibility that one of the servers has additional language support installed?
Avatar of mmanju

ASKER

I apologise for being a pain. But, would you be kind enough to tell me how to look for that information? Your help is greatly appreciated.

Thank you
Hello mmanju!

Just try to

select parameter, value
  from v$nls_parameters
  where parameter like '%CHARACTERSET%';

It returns one (for Oracle7) or two (for Oracle8) rows that inform you about character set(s) installed. Watch a difference between your databases (if it exists)...

Andrew Rodionov
Avatar of mmanju

ASKER

Adjusted points to 150
Avatar of mmanju

ASKER

Thanks very much. That answered my question. The character set is set to WE8DEC and that should be the reason.

Thanks to all of your for your help.

Please accept an answer.

Thanks
Why accept? He can left it hang, untill it will be scheduled for deletion.
Is it possible?..
So let have it on your conscience...

Andrew Rodionov
ASKER CERTIFIED SOLUTION
Avatar of sudhi022299
sudhi022299

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmanju

ASKER

EXCUSE ME GUYS. I ONCE AGAIN, JUST FOR CLARIFICATION, I DID CHOOSE THE "ACCEPT COMMENT AS ANSWER" BUTTON AND I DONT KNOW WHY ITS NOT GETTING REPORTED. DID SOMETHING CHANGE? ONCE AGAIN SORRY ABOUT THIS, AND IS THERE A SEPERATE ACCEPT ANSWER THAT I HAVE TO USE?

PLEASE LET ME KNOW.

THANK YOU
Excuse me mmanju, but you accepted wrong answer in my opinion...

Andrew Rodionov
Avatar of mmanju

ASKER

I realised that one after I committed the mistake. I need to accept the answer given by you on Feb 21st, which was the one that completed my need. Is there a way the change it please.

Once again, my apologies about all this stuff.

Thank you
OK.

Relax and feel free to ask any other questions ;)

Andrew
Avatar of mmanju

ASKER

Thanks guys, you are all just wonderful.
Still, if there is a way, please let me know. I will go ahead and change it.

Manju
Manju, you can create another Q with the title as "Points for Andrew" and accept it.

I could have created anoterh Q myself but i don't have so much of points right now. I can put a Q for only 100 points.

Regards,
Sudhi.