GROUP BY and SUM problem

Gunnar Swan GunnarSwan at PracticeToPass.com
Wed Feb 26 11:44:59 CST 2003


I'm having a problem with SUM.
The fields I SUM are defined as #kTypeUShort

The following SQL produces Null, where it should give me a SUM of values

SELECT 
COUNT(fldResponseDate), 
 SUM(fldCorrectCount), 
 SUM(fldIncorrectCount), 
 SUM(fldSkippedCount) 
FROM tblChartData 
GROUP BY fldResponseDate 
ORDER BY fldResponseDate 

-- [[2, <Null>, <Null>, <Null>], [2, <Null>, <Null>, <Null>]]

This SQL shows that there is data to SUM.

SELECT 
 fldResponseDate, 
 fldCorrectCount, 
 fldIncorrectCount, 
 fldSkippedCount 
FROM tblChartData 
ORDER BY fldResponseDate "

-- [[20030224, 2, 13, 5], [20030224, 2, 13, 3], [20030225, 4, 11, 6], [20030225, 3, 12, 6]]


What am I doing wrong ?

Best Regards,
Gunnar Swan
http://www.PracticeToPass.Com
Software Built For Statutory Courses




More information about the Valentina mailing list