Re: How to examin BLOB (Long Row) using SQL*Plus?

From: Jean-Philippe Squelbut <squelbut_at_csi.com>
Date: 1998/12/01
Message-ID: <uzneEdQH#GA.139_at_nih2naaa.prod2.compuserve.com>#1/1


For the same need, I have been given this solution by Tecnical Support. set serveroutput on
drop table t1 ;
create table t1 (col1 long raw, col2 number) ; insert into t1 values('abcdef',1 ) ;

DECLARE
-- lr1 LONG RAW ;
 v1 VARCHAR2(2000) ;
BEGIN
 SELECT col1 into v1 FROM t1 where col2 = 1 ;  dbms_output.put_line(v1) ;
END ; It 's ok if your long raw is smaller than 2000.

Hope this will help.

nasser_at_apldbio.com a écrit dans le message <73mfck$knl_at_drn.newsguy.com>...
>
>hi,
>
>I understand that simply doing a 'select' on a field whose type is LONG RAW
>wil result in the error:
>
>ORA-00932: inconsistent datatypes
>
>using SQLplus. Since SQL plus does not like to display LONG RAW data. (was
>told anything over 256 bytes in length will result in this error).
>
>My question, is there another trick I can use to, if not display this
>field, at least find how many bytes are stored in the field?
>
>The reason I need to do that, is to make sure my program that reads
>these fields is correct by comparing its results with SQL plus results.
>
>thanks!
>Nasser
Received on Tue Dec 01 1998 - 00:00:00 CET

Original text of this message