Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: length of a long raw column
set serveroutput on
declare
cursor v_cur is select c3 from testlraw;
begin
for v_row in v_cur
loop
dbms_output.put('Length: '||lengthb(v_row.c3)/2);
dbms_output.new_line;
end loop;
end;
In article <39329367.EC5BBDF9_at_bigfoot.de>, Thomas Kober <t.kober_at_bigfoot.de> writes:
>Thanks Sybrand, but it does not work.
>
>SQL> select vsize(foo) from foobar;
>select vsize(foo) from foobar
> *
>ERROR at line 1:
>ORA-00997: illegal use of LONG datatype
>
>It's possible to fetch a LONG RAW piecewise?
>
>Thanks
>Thomas
>
>Sybrand Bakker wrote:
>>
>> Use the vsize function.
>>
>> Hth,
>>
>> Sybrand Bakker, Oracle DBA
>>
>> Thomas Kober <t.kober_at_bigfoot.de> schreef in berichtnieuws
>> 392A4A4C.F89BFAFF_at_bigfoot.de...
>> > Hi Oracle PL/SQL experts,
>> >
>> > how do i examine the length of a long raw column
>> > with PL/SQL and sqlplus?
>> >
>> > Example:
>> > create table foobar (id number, foo long raw);
>> > insert into foobar values (1, '010101');
>> >
>> > select length(foo) from foobar
>> > *
>> > ERROR at line 1:
>> > ORA-00932: inconsistent datatypes
>> >
>> > Can Oracle PL/SQL experts there help me?
>> >
>> > Thanks
>> > Thomas
>
Paul in VT Received on Mon Jun 05 2000 - 00:00:00 CDT