Symptom
The following is a scenario where queries have different result set, but the results should be the same.
======
1) Return 4 rows
select ta.id
from #ta ta
inner join #tb tb
on ta.id = tb.id;
id
--------------------
AAA
AAA
AAA
AAA
2) Return 4 rows
select ta.id
from #ta ta
inner join #tb tb
on ta.id =
case
when tb.id='X' then 'YYY'
when tb.id='X' then 'YYY'
else tb.id
end case;
id
--------------------
AAA
AAA
AAA
AAA
3) Does not return 4 rows
select ta.id
from #ta ta
inner join #tb tb
on ta.id =
case
when tb.id='X' then 'YYY'
else tb.id
end case;
go
id
--------------------
AAA
AAA
Read more...
Environment
- SAP IQ 15.4
- SAP IQ 16.0
- SAP IQ 16.1
Product
Keywords
query queries different wrong result set case inner join CR 823410 CR823410 , KBA , BC-SYB-IQ , Sybase IQ , Bug Filed
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.
SAP Knowledge Base Article - Preview