Solved

chr function

Posted on 2000-02-18
22
2,022 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:mmanju
  • 9
  • 4
  • 3
  • +4
22 Comments
 
LVL 4

Expert Comment

by:sudhi022299
ID: 2534907
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.
0
 
LVL 1

Expert Comment

by:vishone
ID: 2535131

 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
0
 

Author Comment

by:mmanju
ID: 2535910
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
0
 
LVL 3

Expert Comment

by:bkowalski
ID: 2536046
It's in v$parameter and is called nls_language.

-Brad
0
 

Author Comment

by:mmanju
ID: 2536917
Its set to AMERICAN in both systems and nls_territory is set to AMERICA, but both behave differently.

Any ideas?
0
 
LVL 6

Expert Comment

by:crsankar
ID: 2537441
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).
0
 

Author Comment

by:mmanju
ID: 2538488
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
0
 
LVL 6

Expert Comment

by:crsankar
ID: 2539161
Is there any possibility that one of the servers has additional language support installed?
0
 

Author Comment

by:mmanju
ID: 2540088
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
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2541799
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
0
 

Author Comment

by:mmanju
ID: 2542457
Adjusted points to 150
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:mmanju
ID: 2542458
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.

0
 
LVL 6

Expert Comment

by:crsankar
ID: 2545424
Please accept an answer.

Thanks
0
 
LVL 3

Expert Comment

by:rwarsh
ID: 2555370
Why accept? He can left it hang, untill it will be scheduled for deletion.
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2556681
Is it possible?..
So let have it on your conscience...

Andrew Rodionov
0
 
LVL 4

Accepted Solution

by:
sudhi022299 earned 150 total points
ID: 2556785
manju, you have to accept the answer and give the expert the points failing which , you may not get answers to your future Qs.
0
 

Author Comment

by:mmanju
ID: 2557812
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
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2557857
Excuse me mmanju, but you accepted wrong answer in my opinion...

Andrew Rodionov
0
 

Author Comment

by:mmanju
ID: 2557866
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
0
 
LVL 2

Expert Comment

by:AndrewRodionov
ID: 2557890
OK.

Relax and feel free to ask any other questions ;)

Andrew
0
 

Author Comment

by:mmanju
ID: 2557902
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
0
 
LVL 4

Expert Comment

by:sudhi022299
ID: 2558046
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.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now