Icon View Incident Report

Serious Serious
Reported By: J. Pieter Vos
Reported On: 3/21/2002
For: Version 3.07 Build 1
# 1064 Using a Query Result Set Containing an AVGed Column in Another Query Can Result in AV

There's a bug when doing the avg() function, it gives me access violation errors (Both from my program as from dbsys). If you remove ,Avg(C.Preu) as Mitg from Line 1 and ,Cast("" as Float) as Mitg from Line 7 you'll see it works.

select C.CodiArticle, Sum(C.Unitats) as Compra, Sum(Cast("" as 
Float)) as Venda, Min(C.Preu) as Minim,Max(C.Preu) as Maxim,Avg(C.
Preu) as Mitg
into MEMORY llisstock
from "fwcal-RE002002.dat" C,"fwcac-RE002002.dat" CC
Where CC.NumeroAlbara = C.Numero and CC.Anulat = False
and CC.CodiStatus  IN ( "04" , "00" , "50" , "PG" , "EG" , "FG" , 
"05" , "RG" , "06" , "01" , "07" , "CO" , "UI" )
union all
select V.CodiArticle, Cast("" as Float) as Compra , V.Unitats,Cast("" 
as Float) as Minim,Cast("" as Float) as Maxim,Cast("" as Float) as 
Mitg
from "fwval-RE002002.dat" V,"fwvac-RE002002.dat" VV
Where VV.NumeroAlbara = V.Numero and VV.Anulat = False
and VV.CodiStatus  IN ( "04" , "00" , "50" , "PG" , "EG" , "FG" , 
"05" , "RG" , "06" , "01" , "07" , "CO" , "UI" )
Group by CodiArticle
Order by CodiArticle;


select CodiArticle , Sum(StockInicial) as SI  into MEMORY StockIni 
from "fwmagart-RE002002.dat"
Where Actiu = True
Group by CodiArticle;

Select * from MEMORY llisstock P
LEFT OUTER JOIN MEMORY StockIni P2 ON (P.CodiArticle = p2.CodiArticle)



Resolution Resolution
Fixed Problem on 3/21/2002 in version 3.08 build 1
Image