Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to examin BLOB (Long Row) using SQL*Plus?

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

From: Adrian Hands <AHands_at_sprynet.com>
Date: 1998/11/28
Message-ID: <3660C010.BDD53D2C@sprynet.com>#1/1

nasser_at_apldbio.com wrote:
>
> 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

Ora-8(Linux) doesn't seem to have this limitation, but I think I remember encountering this on Ora-7(HP-UX) and getting around it by creating a function something like CREATE FUNCTION LONG2VC(IN_LONG LONG) RETURN VARCHAR2 AS STR01 VARCHAR2(2000); BEGIN STR01 := IN_LONG; RETURN STR01; END LONG2VC; and then using this in SQL*PLUS, like SELECT LONG2VC(col01) FROM tab01;.

Hope that helps.

-Adrian Received on Sat Nov 28 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US