Re: Strange(?) behaviour with utl_raw.cast_to_raw

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 21 Jul 2015 05:34:31 +0100
Message-Id: <829C2C7C-4C30-4766-9079-4B95DD6D5396_at_jlcomp.demon.co.uk>


Try dump(... , 16)
97 = 0x0061 -- 2 bytes

Regards
Jonathan Lewis

Sent from my iPad

> On 21 Jul 2015, at 03:38, Steve Baldwin <stbaldwin_at_multiservice.com> wrote:
>
> Is this expected behaviour?
>
> SQL> select length(utl_raw.cast_to_raw('abc')) from dual;
>
> LENGTH(UTL_RAW.CAST_TO_RAW('ABC'))
> ----------------------------------
> 6
>
> SQL> select dump(utl_raw.cast_to_raw('abc')) from dual;
>
> DUMP(UTL_RAW.CAST_TO_RAW('ABC'))
> --------------------------------------------------------------------------------
> Typ=23 Len=3: 97,98,99
>
> I was expecting the first select to return a length of 3 - just like the dump in the second select.
>
> (Oracle 11.2.0.4)
>
> Thanks,
>
> Steve
>
> ------------------------------------------------------------------
> This email is intended solely for the use of the addressee and may
> contain information that is confidential, proprietary, or both.
> If you receive this email in error please immediately notify the
> sender and delete the email..
> ------------------------------------------------------------------

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jul 21 2015 - 06:34:31 CEST

Original text of this message