SAP Knowledge Base Article - Preview

2257667 - SAP IQ16 SP10.7 : 'Union All' Query returned incorrect result.

Symptom

During migration project, customer found legacy 'Union All' query returned incorrect result.
Latest patch SP10.7 has a fix related to 'Union all' issue. But this query still returned incorrect result in IQ16 SP10.7.

 * SQL structure and Findings :

    - Only 'Block-A' returns 88 rows
    - Only 'Block-B' returns  0 rows
    - But whole SQL should return 88 rows. But 0 rows returns.
    - Using Options, Dml_options7=8 or Join_preferemce=-4, returns 88 rows.

     Select-Block-A       --- return 88 rows
      UNION ALL
     Select-Block-B       --- return 0 rows
        ( B-1 
           UNION ALL
          B-2
        ) A
       LEFT OUTER JOIN  ( B-3 )
       LEFT OUTER JOIN  ( B-4 )     
       LEFT OUTER JOIN  ( B-5 )
       ... ;

 * W/A : Below two W/A each makes correct results

     1) SET temporary option Dml_options7=8
     2) SET temporary option Join_preferemce=-4  ;  -- avoid hash join


Read more...

Environment

SAP IQ 16.0

Product

SAP IQ 16.0 ; SAP Sybase IQ 15.2 ; SAP Sybase IQ 15.4 ; Sybase IQ 12.7

Keywords

"parallel outer algorithm" ; "serial outer join algorithm" ; , KBA , BC-SYB-IQ , Sybase IQ , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.