SELECT DISTINCT (SELECT Avg(tblAverage.fld1) AS AvgOffld1 FROM tblAverage WHERE fld1 > 0 ) AS Avgfld1, (SELECT Avg(tblAverage.fld2) FROM tblAverage WHERE fld2 > 0 ) AS Avgfld2 FROM tblAverage;
I'm not sure where to put in the table and fild names. Is this correct?:
SELECT DISTINCT (SELECT Avg(YourTable.Thefield1) AS AvgOfThefield1 FROM YourTable WHERE Thefield1 > 0 ) AS AvgThefield1, (SELECT Avg(YourTable.Thefield2) FROM YourTable WHERE Thefield2 > 0 ) AS AvgThefield2 FROM YourTable;
I found it under "field properties". The tricky thing was that I had chosen "Format: general Number" and "decimal Places: 2", but it didn't work. Now I have chosen "Format: Standard" and "decimal Places: 2". Now it works :)
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.