Convert from Oracle VARCHAR2 to MySQL TEXT
How to do correct conversion of data from Oracle VARCHAR2 type to MySQL TEXT type? I want insert it into mysql table in field with TEXT type开发者_如何学JAVA through DBLink.
Something like this might work. I wasn't sure which way you are going but the Oracle package dbms_lob will convert varchar2 to various BLOB, LOB, CLOB formats.
You might need to use a temporary table to pull source data to target side first if there are problems with the database link.
insert into database.target_table@DBLINK(text1, text2)
select
dbms_lob.substr(s.text1, 4000, 1),
dbms_lob.substr(s.text2, 4000, 1)
from
source_table s;
精彩评论