SAP Knowledge Base Article - Preview

3321779 - Expressions in subqueries inside LEFT JOIN are not evaluated - SAP IQ

Symptom

After upgrade from IQ15.4 to 16.1, Rows containing (NULL) values are not evaluated when evaluating right table column values in a subquery within a LEFT JOIN.

ex: 

 Select col1, col2, col_c, col_d from j01
   left join (select j02.col1 as col_c, if(j02.col2 IS NULL) then 'ABC' else 'TTT' endif as col_d from j02) j02a
          on j01.col1 = j02a.col_c ;

   col1 col2   col_c  col_d   
   ---------------------------
   1 abcd (NULL) (NULL) 
   2 abcd      2      TTT    

But SAP IQ 15.4 returned below output --  'ABC' is set to col_d in the first row.

   col1 col2   col_c  col_d   
   ---------------------------
   1 abcd (NULL)  ABC 
   2 abcd      2      TTT    


Read more...

Environment

  • SAP IQ 16.x
  • SAP IQ 15.4

Keywords

"15.2", "15.3", "15.4", "LEFT JOIN", "derived table", "incorrect results", "Sort Merge", "HASH", "subquery", "NULL" , 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.