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

Home -> Community -> Usenet -> c.d.o.server -> Re: Varbinary in Oracle

Re: Varbinary in Oracle

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 15 Mar 2004 23:46:14 +0000 (UTC)
Message-ID: <c35f86$btf$1@sparta.btinternet.com>

I think what you're looking for is:

select to_number(rawtohex({varbinary}),'XX') from dual

This works if varbinary is a variable or column

-- 
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

April 2004 Iceland
June  2004      UK - Optimising Oracle Seminar


"FCA" <marakaimbo_at_libero.it> wrote in message
news:c2s8aa$20hmh7$1_at_ID-110320.news.uni-berlin.de...

> Hello all!
>
> How can in Oracle convert a varbinary (0xCC) in decimal where cc is an
> HEX???
>
> 1)VARBINARY --> 0xCC
>
> 2)I would like to convert cc(HEX) in the corrispondent decimal value=204
>
> In Sybase I use this kind of syntax:
> select convert(tinyint, substring(0xcc, 1 ,1))
> The output is:
> 204
>
> Can anyone help me please.
>
> Thanks.
>
>
>
Received on Mon Mar 15 2004 - 17:46:14 CST

Original text of this message

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