title: ORA-22992 Remove references to LOB in remote table issue
body: <p>I am trying to insert into table CAPTURED_DATA_01 with multiple select statement.I am able to insert the value EVENT_ID,ENV_ID,BRAND_ID,BP_ID but now i also want to insert the SUBSCRIPTION_ID value which is coming i will get from using the select statement in remote table. The query i have tested and runs fine for getting the SUBSCRIPTION_ID. But when i try to use this select statement in order to insert the value of SUBSCRIPTION_ID into inside my insert query then i am getting the error where i have used cast function  for the SUBSCRIPTION_ID inside my subquery as </p>
  
  <pre><code>SQL Error: ORA-22992: cannot use LOB locators selected from remote tables
  22992. 00000 -  "cannot use LOB locators selected from remote tables"
  *Cause:    A remote LOB column cannot be referenced.
  *Action:   Remove references to LOBs in remote tables
  </code></pre>
  
  <p>Here is my Query:</p>
  
  <pre><code>Insert into CAPTURED_DATA_01(SUBSCRIPTION_ID) 
  select WF.SUBSCRIPTION_ID 
     from 
     (select WF.SUBSCRIPTION_ID from WF_WORKFLOW@FONIC_RETAIL WF,CAPTURED_DATA_01 CP
  where WF.SUBSCRIPTION_ID &gt; CP.SUBSCRIPTION_ID and 
  WF.SUBSCRIPTION_ID IN
  ( 
  select iw.SUBSCRIPTION_ID
  from (
     SELECT TO_NUMBER(REPLACE(REPLACE(REGEXP_SUBSTR(RESPONSE_XML, '&lt;ax2147:subscriptions xsi:type="ax2127:SubscriptionDTO"&gt;&lt;ax2130:id&gt;\d+&lt;/ax2130:id&gt;'), 
     '&lt;ax2147:subscriptions xsi:type="ax2127:SubscriptionDTO"&gt;&lt;ax2130:id&gt;', ''), '&lt;/ax2130:id&gt;', '')) 
     AS SUBSCRIPTION_ID , 
     CAST(REPLACE(REPLACE(
    REGEXP_SUBSTR(REQUEST_XML, '&lt;ns7:orderType&gt;.+&lt;/ns7:orderType&gt;'),
      '&lt;ns7:orderType&gt;', ''), '&lt;/ns7:orderType&gt;', '')
    AS VARCHAR(100)) AS order_type,
    TO_NUMBER(REPLACE(REPLACE(REGEXP_SUBSTR(RESPONSE_XML, '&lt;ax2147:orderNumber&gt;\d+&lt;/ax2147:orderNumber&gt; '), 
     '&lt;ax2147:orderNumber&gt;', ''), '&lt;/ax2147:orderNumber&gt; ', '')) 
     AS ORDER_NUMBER,
     CREATE_DATE
     FROM
     SOAP_MONITORING@FONIC_RETAIL 
     where WEB_SERVICE_NAME='RatorWebShopService' and WEB_METHOD_NAME='placeShopOrder' 
  ) iw
  where iw.order_type='SELF_REGISTRATION'
  )and WF.NAME='INITIATE_MANDATE' 
  and WF.STATUS_ID=0)
  </code></pre>