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!

BLOB from SQLServer to Oracle

2735689Jun 19 2017 — edited Jun 21 2017

Hi,

I have a problem to import BLOB field.

I have a DBLINK with a SQLSERVER database with a table with pictures in a field.
I need to import in my Oracle DB 12c this pictures. How can I do?

I tried with:

CREATE TABLE myTab AS SELECT * FROM tb1@dblink;

This is the error:


Errore SQL: ORA-00997: Uso non consentito del tipo dati LONG
00997. 00000 -  "illegal use of LONG datatype"
*Cause:   
*Action:

CREATE TABLE tblob ( f1 BLOB);
INSERT INTO tblob (SELECT TO_LOB(field1) FROM tb1@dblink);

Report errori -
Errore SQL: ORA-00997: Uso non consentito del tipo dati LONG
00997. 00000 -  "illegal use of LONG datatype"
*Cause:   
*Action:

CREATE TABLE tCLOB (f1 CLOB);
INSERT INTO tclob (SELECT TO_LOB(field1) FROM tb1@dblink);

Report errori -
Errore SQL: ORA-00932: tipi di dati incoerenti: previsto CLOB, ottenuto BLOB
00932. 00000 -  "inconsistent datatypes: expected %s got %s"
*Cause:   
*Action:

Who can help me?
Thanks
Manu

This post has been answered by Paulzip on Jun 20 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2017
Added on Jun 19 2017
12 comments
1,069 views