November 24, 2006 at 5:09 am
Hi All,
I have two Database, one is in SQL Server 2005 and Another one is in Oracle.
Both DB have same objects and records.
But When I fire one query in both DB's then I got different Result.
Select statement of Query is as FOllows;
****************************************
SELECT a.FEIN
, a.ClassCode AS Class_Code
, c.Factor
, b.terrrate
, (COALESCE(c.Factor, 0.0) * b.TerrRate ) Amount
, ((COALESCE(c.Factor, 0.0) * b.TerrRate) * POWER(10.0, 4)) "After Power"
, ((COALESCE(c.Factor, 0.0) * b.TerrRate) * POWER(10.0, 4) + 0.5) As "Befaore Floor"
, FLOOR(((COALESCE(c.Factor, 0.0) * b.TerrRate) * POWER(10.0, 4)) + 0.5) As "After Floor"
, (CAST(FLOOR(((COALESCE(c.Factor, 0.0) * b.TerrRate) * POWER(10.0, 4)) + 0.5 ) as float) / POWER(10.0, 4)) * 100 As "Adj Rate"
All the conditions are same in both query.
OutPut of SQL Server is
************************
FEIN CLASS_CODE FACTOR TERRRATE AMOUNT After Power Befaore Floor After Floor Adj Rate
953456375 3178 0.047 0.95 0.04465 446.5 447 446 4.46 4.4600
953456375 8742 0.009 0.95 0.00855 85.5 86 86 0.86 0.8600
953456375 8810 0.0084 0.95 0.00798 79.8 80.3 80 0.8 0.8000
OutPut of Oracle is as follows;
*********************************
FEIN CLASS_CODE FACTOR TERRRATE AMOUNT After Power Befaore Floor After Floor Adj Rate
1 953456375 3178 0.047 0.95 0.04465 446.5 447 447 4.47
2 953456375 8742 0.009 0.95 0.00855 85.5 86 85 0.85
3 953456375 8810 0.0084 0.95 0.00798 79.8 80.3 80 0.8
What is resion behind this.
I am in confusion. Please somebody guide me.
Thanks is advance.
November 24, 2006 at 7:00 am
Maybe the floating point [im] precision is different between the 2 Softwares. I'm just throwing this out there as I have never encountered that problem before.
November 24, 2006 at 7:26 am
floating point precision (if they are floats) also the numeric specifications between products are different
MVDBA
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply