Dblink access ORA-00997: Invalid use of LONG data type

Source: Internet
Author: User

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 ';

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.