Icon View Incident Report

Serious Serious
Reported By: Harry Van Tassell
Reported On: 2/21/1999
For: Version 1.12 Build 1
# 316 Logical Record Numbers SQL Result Sets Incorrect

Using this SQL

SELECT Company, Department, ExpenseType, BudgetYear, Quarter, SUM(Budget),
SUM(Actual), COUNT(Actual), AVG(Actual), MIN(Actual), MAX(Actual)
INTO "ResultDBISAM.Dat"
FROM BUDGET
GROUP BY Company, Department, ExpenseType, BudgetYear, Quarter

(1) The SQL result displayed in SysUtil looks OK except reported record no seq is 1,0,1.,2,3...

(2) The result table ResultDBISAM.Dat is ordered wrong even though the SQL result is correct.
The third field "ExpenseType" in the GroupBy (which is the 7th field vs "Company"=2 and "DepartMent"= 3) is ordered incorrectly.

Note that I had the exact same order problem when I used an index of "Company; Department; ExpenseType; BudgetYear; Quarter" to generate the result table by my own "looping" of a TDBISAMTable technique using an AutoInc Row___No field as the Primary index and then put that primary field in 1,2,3,4... sequence by replacing the field contents using your "TDataFile(MyDBISAMTable.Handle).RestructuringData:=True" trick. For other reasons I switched to using the 5-field index as the Primapry and eliminated the AutoInc field entirely.

(3) However, when I use the 5-field index as the Primary in my "looping" technique the order is all correct, but the damn reported record no sequence shown in SysUtil is 1,32,33,34... Then if I use the the Action| Goto Record 31 record #61 becomes the current record no.


Comments Comments
The second problem with the GROUP BY and ORDER BY indexes in result tables has not been corrected yet.


Resolution Resolution
Fixed Problem on 2/28/1999 in version 1.13 build 1
Image