PL/SQL (MOSC)

MOSC Banner

Long To CLOB over DB links

edited Mar 2, 2021 1:55AM in PL/SQL (MOSC) 6 comments

db 12.2.0.1 (SOURCE AND TARGET)

We are trying to bring a data from remote database and running into error.


SQL Error: ORA-00997: illegal use of LONG datatype

00997. 00000 - "illegal use of LONG datatype"

*Cause:   

*Action:

INSERT INTO TABLE1 (MESSAGE)
 SELECT  
 MESSAGE
 FROM TABLE2@DBLINK  


TABLE2 - MESSAGE FIELD is LONG data type
MESSAGE     LONG  
TABLE1 - MESSAGE FIELD is CLOB data type
MESSAGE      CLOB   

Can you kindly help me what i am doing wrong here. can i bring the data from long field to clob field over db links?

i have tried below but still same error,

INSERT INTO TABLE1 (MESSAGE)
 SELECT  
 TO_LOB(MESSAGE)
 FROM TABLE2@DBLINK 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center