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: Convert CHAR to BLOB?

Re: Convert CHAR to BLOB?

From: Michael O'Shea <michael.oshea_at_tessella.com>
Date: 7 Jun 2005 00:41:53 -0700
Message-ID: <1118130108.313597.87900@g47g2000cwa.googlegroups.com>


Hi, AFAIK there is no single built in function to perform your "HEXTOCHAR" functionality. However you can do it indirectly through code not unlike that demonstrated below.

SQL>
SQL> SELECT
UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('5465737420537472696E67')) HEX2CHAR FROM DUAL; HEX2CHAR



Test String

SQL>
SQL> Regards

TESSELLA Michael.OShea_at_tessella.com

__/__/__/  Tessella Support Services plc
__/__/__/  3 Vineyard Chambers, ABINGDON, OX14 3PX, England
__/__/__/  Tel: (44)(0)1235-555511  Fax: (44)(0)1235-553301
www.tessella.com Registered in England No. 1466429

raedwa01_at_gmail.com wrote:
> Just a follow up question. I have been able to get the character
> string to convert to a blob fine now. The problem is that the hash
> value is not being set right. I figured out what the byte array
> represented as a hex string is, now i just need to convert the hex
> string into varchar. I tried using HEXTOCHAR() and got an error that
> it must be declared. I'm on Oracle 10g. Is this in some package i
> need to reference?
>
> Thanks,
> Rob
Received on Tue Jun 07 2005 - 02:41:53 CDT

Original text of this message

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