Skip to Main Content

Oracle Database Discussions

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!

ORA-00997: illegal use of LONG datatype

santhosh TJun 28 2022 — edited Jun 28 2022

Hi All,

I am getting "ORA-00997: illegal use of LONG datatype" this error.

I am accessing a view(Source : sql server data) through the dblink in my oracle db(destination).

The source view is having the LONG data type column( which is not changable) and am unable to convert it to CLOB/VARCHAR2 at the destination also.

  1. Tried with CTAS not worked.
  2. Tried to create the table at destination and INSERT INTO also not worked.

SOURCE SQL: >SELECT * FROM PS_FN_POMAP@dblink

DESTINATION:

>CREATE TABLE PS_FN_POMAP_TBL AS SELECT PS_PO_NUM,PS_REQ_ID,PO_NUM FROM PS_FN_POMAP@dblink;

Error: ORA-00997: illegal use of LONG datatype

>CREATE TABLE PS_FN_POMAP_TBL
(
PS_PO_NUM VARCHAR2 (100),
PS_REQ_ID VARCHAR2 (100),
PO_NUM VARCHAR2(100)
);

RESULT: TABLE CREATED.

>INSERT INTO PS_FN_POMAP_TBL SELECT * FROM PS_FN_POMAP@dblink;

Error: ORA-00997: illegal use of LONG datatype

Please suggest any other ways on how to access Source LONG data type as VARCHAR2/CLOB at Destination.

Thank you

Comments
Post Details
Added on Jun 28 2022
2 comments
1,646 views