Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX : script help/input
Jared.Still_at_radisys.com wrote:
> Left pad with zeroes, take a substring, feed it to the handy-dandy
> hex/oct/bin/dec converter package - much easier.
Jared, what Oracle edition do you use? I'm asking because you might want to consider not to use 'handy-dandy' hex/oct/bin/dec converter package, but TO_CHAR/TO_NUMBER in case it's >= 8i -- it would work faster.
SELECT TO_NUMBER(SUBSTR('0x0000500000AA', -6), 'FM00000X') dec
, '0x' || TO_CHAR(170, 'FM00000X') hex
FROM dual
/
-- Vladimir Begun The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Vladimir Begun INET: Vladimir.Begun_at_oracle.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Oct 02 2003 - 14:24:28 CDT
![]() |
![]() |