Home » SQL & PL/SQL » SQL & PL/SQL » converting to "\u" notation in Oracle (10g,xp)
converting to "\u" notation in Oracle [message #434080] Mon, 07 December 2009 02:30 Go to next message
ayush_anand
Messages: 417
Registered: November 2008
Senior Member
Any idea what is \u notation here?

We can use "\u" notation instead of any letter. For instance, instead of using the Greek πp, we could write:

\u03C0

through google I got the unicode notation
but is their any way in Oracle to convert to Unicode Notation?

[Updated on: Mon, 07 December 2009 02:38]

Report message to a moderator

Re: converting to "\u" notation in Oracle [message #434081 is a reply to message #434080] Mon, 07 December 2009 02:33 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
UNISTR

Regards
Michel
Re: converting to "\u" notation in Oracle [message #434096 is a reply to message #434081] Mon, 07 December 2009 03:09 Go to previous messageGo to next message
ayush_anand
Messages: 417
Registered: November 2008
Senior Member
It converts from unicode to national character set

SELECT UNISTR('\03C0')  FROM DUAL
π


is their any way to convert π to 03CO backward?
Re: converting to "\u" notation in Oracle [message #434104 is a reply to message #434096] Mon, 07 December 2009 03:47 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select to_char(ascii(UNISTR('\03C0')),'fm000X') from dual;
TO_CH
-----
03C0

1 row selected.

Regards
Michel
Re: converting to "\u" notation in Oracle [message #434108 is a reply to message #434104] Mon, 07 December 2009 03:52 Go to previous messageGo to next message
ayush_anand
Messages: 417
Registered: November 2008
Senior Member
strange as

select to_char(ascii('π'),'fm000X') from dual;
returns
CF80

in Oracle SQL Developer tool
Re: converting to "\u" notation in Oracle [message #434113 is a reply to message #434108] Mon, 07 December 2009 04:00 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You may have a different character set in client and server and your character is not valid for one character set or the other one, so you get a replacement character.

Regards
Michel
Re: converting to "\u" notation in Oracle [message #434118 is a reply to message #434113] Mon, 07 December 2009 04:07 Go to previous message
ayush_anand
Messages: 417
Registered: November 2008
Senior Member
hmm... makes sense
thank you
Previous Topic: running total
Next Topic: Help with incrementing with ROWNUM
Goto Forum:
  


Current Time: Thu Sep 29 14:13:45 CDT 2016

Total time taken to generate the page: 0.09283 seconds