title: ORA-30926 error when running the merge into query
body: <p>I'm getting an error with this query:</p>
  
  <pre><code> MERGE INTO edw_clctns_equip_dim d
     USING psa_equipment_status_history
        ON ( dw_equipment_id = TO_NUMBER (d.clctns_equip_source_id)
             AND d.active_ind = 'Y')
   WHEN MATCHED THEN
    UPDATE
       SET clctns_initial_status_date =
              (SELECT MIN (effective_date)
                 FROM psa_equipment_status_history
                WHERE dw_equip_status_type_id IN (
                                         SELECT dw_equip_status_type_id
                                           FROM psa_equipment_status_type
                                          WHERE equipment_status_code = '100')
                  AND current_flag = 'Y'
                  AND iud_flag &lt;&gt; 'D'
                  AND dw_equipment_id = TO_NUMBER (d.clctns_equip_source_id))
  </code></pre>
  
  <p>I can use the simple update query, but it is taking way too long. Does the merge statement help?</p>
  
  <pre><code>Update EDW_CLCTNS_EQUIP_DIM d
  Set CLCTNS_INITIAL_STATUS_DATE =
  ( SELECT 
      MIN(EFFECTIVE_DATE)
    FROM PSA_EQUIPMENT_STATUS_HISTORY
    WHERE DW_EQUIP_STATUS_TYPE_ID In
    ( Select DW_EQUIP_STATUS_TYPE_ID
      From PSA_EQUIPMENT_STATUS_TYPE
      Where EQUIPMENT_STATUS_CODE = '100'
    )
    AND CURRENT_FLAG = 'Y' 
    AND IUD_FLAG&lt;&gt;'D'
    AND DW_EQUIPMENT_ID=to_number(d.CLCTNS_EQUIP_SOURCE_ID)
  );
  </code></pre>