SAP Knowledge Base Article - Preview

2804359 - A join query with subquery used with NOT EXISTS or a right outer join query produces incorrect result. -- SAP IQ

Symptom

A join query stated with a subquery used with NOT EXISTS (example 1) or a right outer join query (example 2) 
with non-equality join condition may return wrong result.

* example 1:

select * from T1 as A1
where A1.account_id in (33712742, 33712768, 33712770)
   and not exists(select 1 from T2 as A2
                         where A2.account_id = A1.account_id
                            and A2.START_DATE > A1.CLOSE_DT)
order by A1.account_id;

* example 2:

select * from T1 A1 left outer join T2 A2
     on (A1.account_id = A2.account_id and A2.START_DATE > A1.CLOSE_DT)
where A1.account_id in (33712742, 33712768, 33712770)
order by A1.account_id;


Read more...

Environment

  • SAP IQ16.0 SP11.20 
  • SAP IQ16.1 SP02.15

Product

SAP Sybase IQ 15.4

Keywords

Wrong result,  "Not Exists", "outer Join", , 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 ONE Support launchpad (Login required).

Search for additional results

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