Home » SQL & PL/SQL » SQL & PL/SQL » Decimal to Hex conversion of function?
Decimal to Hex conversion of function? [message #257063] Tue, 07 August 2007 08:54 Go to next message
ronin10
Messages: 17
Registered: July 2007
Junior Member
Is there a Decimal to Hex conversion available for Oracle? I need to get the unistr('\....') value of a variable.
Re: Decimal to Hex conversion of function? [message #257066 is a reply to message #257063] Tue, 07 August 2007 09:08 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
TO_CHAR(<decimal>,'XXXXX')
should work.

MHE

Re: Decimal to Hex conversion of function? [message #257069 is a reply to message #257063] Tue, 07 August 2007 09:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the relation between Unicode string and hexadecimal value?

For the first question:
SQL> select to_char(115,'XX') from dual;
TO_
---
 73

1 row selected.

Regards
Michel
Re: Decimal to Hex conversion of function? [message #257070 is a reply to message #257069] Tue, 07 August 2007 09:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Ooops, Maarten was faster.

Regards
Michel
Re: Decimal to Hex conversion of function? [message #257078 is a reply to message #257069] Tue, 07 August 2007 09:22 Go to previous messageGo to next message
ronin10
Messages: 17
Registered: July 2007
Junior Member
I thought the the unistr('\ ') only took a hexidecimal value.
Re: Decimal to Hex conversion of function? [message #257110 is a reply to message #257078] Tue, 07 August 2007 10:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, this is correct either character or hexadecimal code point.

Regards
Michel
Re: Decimal to Hex conversion of function? [message #257161 is a reply to message #257063] Tue, 07 August 2007 12:22 Go to previous message
ronin10
Messages: 17
Registered: July 2007
Junior Member
Thanks for the help.
Previous Topic: create a text file and write data (merged)
Next Topic: Select In Trigger
Goto Forum:
  


Current Time: Mon Dec 05 21:04:32 CST 2016

Total time taken to generate the page: 0.14320 seconds