A ORA-00997 is reported when you access the long field of a table through dblink. for example, I want to access the remote ELISDATA through dblink. in the POS_TEST_CASE_AMASS table, where the CASE_PARAM_CHAR field is LONG, some conversions are required before it can be obtained successfully.
You can use the following method.
Sys. dbms_metadata_util.long2varchar (5000, 'elisdata. POS_TEST_CASE_AMASS ', 'case _ PARAM_CHAR', rowid) CASE_PARAM_CHAR is the size, owner table name, column name, And rowid respectively.
To_lob () can also be used, but the data type is converted when ctas is used.
Insert into pos_test_case_amass selectMODULE_NAME, DEAL_CLASS, DEAL_INTERFACE, CASE_SNO, CASE_AMASS_DATE, CASE_PARAM_BASE, CASE_PARAM_MAP, sys. dbms_metadata_util.long2varchar (5000, 'elisdata. POS_TEST_CASE_AMASS ', 'case _ PARAM_CHAR', rowid) CASE_PARAM_CHAR, PK_SERIAL #, CREATED_BY, CREATED_DATE, UPDATED_BY, UPDATED_DATE, RUN_FLAG, USER_NAME, INTERFACE_TYPE, IP, DEAL_TIMEfrom pos_test_case_amass @ elis where deal_class = 'com. palic. elis. pos. intf. biz. action. ECIFQueryAction. getIsVipByPhoneNumberForIVR 'and deal_interface = 'getisvipbyphonenumberforivr ';