Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: substr, substrb and raw datatype
DA Morgan wrote:
> SQL> CREATE TABLE t (
> 2 charcol VARCHAR2(20),
> 3 rawcol RAW(20));
>
> Table created.
>
> SQL> INSERT INTO t VALUES ('ABC', 'ABC');
>
> 1 row created.
>
> SQL> COMMIT;
>
> Commit complete.
>
> SQL> SELECT DUMP(charcol), DUMP(rawcol)
> 2 FROM t;
>
> DUMP(CHARCOL) DUMP(RAWCOL)
> ---------------------- ---------------------
> Typ=1 Len=3: 65,66,67 Typ=23 Len=2: 10,188
But I have asked for differences between substr and substrb function on raw datatype. Why these functions give different results on the same data:
sql> select substr(val, 5,2), substrb(val, 5, 2) from xyz;
SU SUBS
Although on table with varchar2 datatype they give the same result:
sql> desc zyx
Name Null? Type
SU SU
-- Rafal sed -e s/s/a/g <my_address >my_right_addressReceived on Tue Jun 14 2005 - 11:52:37 CDT
![]() |
![]() |