GROUP BY and SUM problem - More
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Feb 26 01:00:12 CST 2003
on 2/26/03 11:32 PM, Gunnar Swan at GunnarSwan at practicetopass.com wrote:
Hi Gunnar,
I have made simple example similar to you, but it works fine.
Send me your db with this table and this few records.
Have you try it in viSQL?
Reindex ?
> When I use COUNT, MIN, MAX or AVG, the functions work.
> Only with SUM does it fail.
> I changed the field type to FLOAT. Still broke.
> I upgraded from 1.9.6 to 1.9.7 . Still broke.
>
> Any ideas ?
>
> ------- Start of forwarded message -------
> From: Gunnar Swan <GunnarSwan at PracticeToPass.com>
> To: Valentina List <Valentina at lists.macserve.net>
> Subject: GROUP BY and SUM problem
> Date: 2/26/03 11:44:58 AM
>
>
> 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,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list