Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX : script help/input

Re: UNIX : script help/input

From: Vladimir Begun <Vladimir.Begun_at_oracle.com>
Date: Thu, 02 Oct 2003 11:24:28 -0800
Message-ID: <F001.005D1D6C.20031002112428@fatcity.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US