Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: substr, substrb and raw datatype
Rafal Dabrowa wrote:
> HansF wrote:
>
>> On Tue, 14 Jun 2005 20:34:57 +0200, Rafal Dabrowa interested us by >> >>> inconsistent with behavior of length/lengthb function pair. >>> Both functions return the same value for raw fields. >> >> >> Assuming your database/session is set to a single byte character set (and >> assuming this will influence the results) length() and lengthb() should >> provide the same result - one character = one byte.
Look at my example again. VARCHAR2 stores 65,66,67 for 'ABC'. Substringing can return 65,66 and you get 'AB'. What are you going to get, if you substring 10,188 which is the representation in RAW?
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Wed Jun 15 2005 - 00:00:17 CDT
![]() |
![]() |