Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with Oracle LONG RAW data type

816802Mar 1 2012 — edited Mar 1 2012
Hi All,

I am facing some issues with Oracle LONG RAW DATA Type.

We are using Oracle 9IR2 Database.

I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.

When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.

I have gone through some docs and found we should not use LONG RAW using these operations.

So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.


I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.


Appreciate if anyone can help me out here.

DECLARE
Y LONG RAW;
BEGIN
FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP

INSERT INTO TRU_CMP.TERRITORY
(
BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
)
VALUES
(
REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
REC.STARTPERIOD, REC.TERRITORYSEQ
)
;

END LOOP;


END;
/
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2012
Added on Mar 1 2012
5 comments
1,354 views