Re: illegal use of LONG datatype

From: Francisco Piragibe <piragibe_at_iis.com.br>
Date: 1995/10/16
Message-ID: <45ukfi$2rf_at_news.iis.com.br>#1/1


zima_at_acsc.com (Zima Yusim) wrote:
>I have a table qw_blobs (I can't control this table, I can't
>change type of the fields because this table was
>created by an aplication that works on the top of Oracle)
>
>describe qw_blobs
>Name Null? Type
> ------------------------------- -------- ----
> BLOBID VARCHAR2(240)
> BLOBSEGSIZE NUMBER(38)
> BLOBSEGNUM NUMBER(38)
> BLOBSEG LONG RAW
>
>At some point I need to execute the following statement
>
>INSERT INTO qw_blobs
>SELECT blobid, blobsegsize, blobsegnum, blobseg FROM table_name.qw_blobs;
>
>I am getting an error message:
>
>SELECT blobid, blobsegsize, blobsegnum, blobseg FROM table_name.qw_blobs
> *
>ERROR at line 2:
>ORA-00997: illegal use of LONG datatype
>
>or even if I am trying to execute SELECT statement
>
>SELECT blobid, blobsegsize, blobsegnum, blobseg FROM table_name.qw_blobs
>I am getting an error message:
>ERROR:
>ORA-00932: inconsistent datatypes
>
>no rows selected
>
>What do you think? Is that an Oracle problem? Do you have any solutions?
>
>Please email your responses to zima_at_acsc.com or call me at
> 310/815 - 4858 ask for Zinovy
>
> ACSC Inc.,
> 3000 S. Robertson Blvd.,
> Los Angeles, CA 90034
> Attn: Zinovy Yusim
> Oracle DBA/Technical Coordinator

LONG columns have several restriction when you manipulate them with SQL statements. One of them led to your first problem: a LONG column can't be used as a source of data in an INSERT ... SELECT statement.

LONG RAW columns are even more restrictive than LONG,once ORACLE does not try to interpret the bit strings. So, if you select a LONG RAW column in SQL*Plus, for instance, you get a ORA-00932 error (inconsistent datatypes). These columns are intended to serve specific applications, prepared to read and interpret them properly. ORACLE FORMS can deal with them, as well as a PRO*C program.

Personally, I try to avoid setting columns this way, unless there's no alternative... Received on Mon Oct 16 1995 - 00:00:00 CET

Original text of this message