We are in the process of trying to upgrage from 11g (11.1.1.9.0) to 12c (12.2.1.3.0) and we are seeing some pretty big problems with our existing reports. Many of the numbers in our calculations are no longer rounding to whatever precision we select in the formatting of that number, they are now just truncating the numbers after 2 decimal spots.
I've tried to put together a very simple and easy example:
11g version: 11.1.1.9.0
12c version: 12.2.1.3.0
Database version: SQL Server 2008 R2
OS version: Windows Server 2016 Standard
I have a report that simply shows 2 attributes (YearWeek & SubmissionDesc), and 1 calculation (CollectedRev). I built the report in 11g (which shows the results correctly) and then put the XML into 12c (which shows the results incorrectly).

Here is the formula for 'Snap Rev %' in the report above:

Notice how 12c just truncates after 2 decimal spots
I have attached the XML for the report out of each environment.
Below is how the query gets generated in 11g vs how the query is generated in 12c:
********************************************************
--11.1.1.9.0
WITH
SAWITH0 AS (select sum(T346632."CollectedRev") as c1,
sum(case when T346625."SnapIndicator" = 'Y' then T346632."CollectedRev" end ) as c2,
T346626."YearWeek" as c3,
T346642."SubmissionDesc" as c4
from
"ExOneDataMart"."EODM1"."DimPermSubmission" T346642 /* Dim_DimPermSubmission */ ,
"ExOneDataMart"."EODM1"."DimPermSubYrWk" T346626 /* Dim_DimPermSubYrWk */ ,
"ExOneDataMart"."EODM1"."DimPermProduct" T346625 /* Dim_DimPermProduct */ ,
"ExOneDataMart"."EODM1"."FactPermRevSnpsht" T346632 /* Fact_FactPermRevSnpsht */
where ( T346625."DimPermProductID" = T346632."DimPermProductID" and T346626."DimDateID" = T346632."DimNewMoneyWeekID" and T346626."YearWeek" = 201821 and T346632."DimPermSubmissionID" = T346642."DimPermSubmissionID" and T346642."SubmissionDesc" = 'CAIR RBC est - no spread adj. Wk 21' and (T346625."PermProdBusName" = 'PRBus1' or T346625."PermProdBusName" = 'PRBus2' or T346625."PermProdBusName" = 'PRBus3' or T346625."PermProdBusName" = 'PRBus4' or T346625."PermProdBusName" = 'PRBus5') )
group by T346626."YearWeek", T346642."SubmissionDesc")
select 0 as c1,
D1.c3 as c2,
D1.c4 as c3,
sum(D1.c2) over () / nullif( sum(D1.c1) over () , 0) * 100 as c4,
0 as c5,
D1.c2 as c6,
D1.c1 as c7
from
SAWITH0 D1
********************************************************
********************************************************
--12.2.1.3.0
WITH
SAWITH0 AS (select sum(T335462."CollectedRev") as c1,
sum(case when T335455."SnapIndicator" = 'Y' then T335462."CollectedRev" end ) as c2,
T335456."YearWeek" as c3,
T346642."SubmissionDesc" as c4
from
"ExOneDataMart"."EODM1"."DimPermSubmission" T335472 /* Dim_DimPermSubmission */ ,
"ExOneDataMart"."EODM1"."DimPermSubYrWk" T335456 /* Dim_DimPermSubYrWk */ ,
"ExOneDataMart"."EODM1"."DimPermProduct" T335455 /* Dim_DimPermProduct */ ,
"ExOneDataMart"."EODM1"."FactPermRevSnpsht" T335462 /* Fact_FactPermRevSnpsht */
where ( T335455."DimPermProductID" = T335462."DimPermProductID" and T335456."DimDateID" = T335462."DimNewMoneyWeekID" and T335456."YearWeek" = 201821 and T335462."DimPermSubmissionID" = T335472."DimPermSubmissionID" and T346642."SubmissionDesc" = 'CAIR RBC est - no spread adj. Wk 21' and (T335455."PermProdBusName" = 'PRBus1' or T335455."PermProdBusName" = 'PRBus2' or T335455."PermProdBusName" = 'PRBus3' or T335455."PermProdBusName" = 'PRBus4' or T335455."PermProdBusName" = 'PRBus5') )
group by T335456."YearWeek", T346642."SubmissionDesc")
select distinct 0 as c1,
D1.c3 as c2,
D1.c4 as c3,
sum(D1.c2) over () / nullif( sum(D1.c1) over () , 0) * 100 as c4,
sum(D1.c2) over () / nullif( sum(D1.c1) over () , 0) * 100 as c5
from
SAWITH0 D1
********************************************************
The really weird thing is that when I run either of these queries SQL Server Management Server, my calculation comes back as 36.56.
HOWEVER, the report in 11g actually shows correct results of 36.5693174722. But that very same report shows 36.56000000 in 12c.
What could be causing this to happen? And what might I do to remedy this situation?
Message was edited by: Chris Arnold