Icon View Incident Report

Serious Serious
Reported By: Grzegorz Rewucki
Reported On: 7/18/2011
For: Version 2.05 Build 10
# 3487 INTERSECT Queries Can Cause Result Set Error When DECIMAL Columns Use Different Scales

Run the following query and you will see the error:

ElevateDB Error #601 The temporary table FLAGSHIP252020368954796BizonCompanyDB113 is corrupt (The index __Distinct is missing a required key)

SELECT T.TytulId, T.Znak, T.Nazwa, 0 AS Zaleglosc,
SUM(O.SGL+O.OGL+O.WGL+O.ZGL+O.UGL) AS Realizacja
FROM TaxiTyt T LEFT JOIN TaxiOper O ON (O.TytulId = T.TytulId)
WHERE (T.Rejestr = 0)
GROUP BY TytulId
HAVING SUM(O.SGL) > 0

INTERSECT

SELECT T.TytulId, T.Znak, T.Nazwa, SUM(P.NG) AS Zaleglosc, 0 AS Realizacja
FROM TaxiTyt T
LEFT JOIN TaxiPoz P ON (P.TytulId = T.TytulId)
WHERE (T.Rejestr = 0)
GROUP BY TytulId



Comments Comments
The problem was caused by the fact that, internally, EDB was using the wrong scale for the DECIMAL column expressions (last two columns) in the two intersecting queries. This was causing the INTERSECT operation to not execute properly because it was interpreting the values incorrectly due to the wrong scale.


Resolution Resolution
Fixed Problem on 7/27/2011 in version 2.05 build 11


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image