SAP Knowledge Base Article - Preview

3003261 - After upgrading ASE server from 15.7 to 16 SP03 PL09, it returns wrong result.


After upgrading ASE 15.7 to 16 SP03 PL09, a prolem sql statement returns wrong result.
The query has many subqueries in SELECT list and if adding extra column which is one of subqueries, it returns correct result.

select s.Brief SecBrief,
s.Name SecName,
s.EmptybillFlag FuturesStyle,
(select sum(op.Qty)
from ...) NumS,
(select sum(op.Qty)
from ...) NumB,
(select sum(op.Qty)
from ...) VarP,
(select sum(op.Qty)
from ...) VarN,
(select sum(op.Qty * op.CharType)
from ...) ResExec,

/* ****** If uncomment this part, result will be correct ***********
(select sum(op.Qty * op.CharType)
from ...) ResExec1,

(select sum(c.Qty)
from ...) Commiss,
case when ... end BaseSecType
into #TMP
from (select distinct sd.DepartmentID
from ...) sc,
where ...

Correct result : 265 rows returned
Wrong result : 174 rows returned



SAP Adaptive Server Enterprise (ASE) 16 SP03 PL09


SAP Adaptive Server Enterprise 16.0


comptibility mode , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , 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.