Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Varbinary in Oracle
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...Received on Mon Mar 15 2004 - 17:46:14 CST
> 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.
>
>
>