[V4RB] GROUP returning too many records

Gunnar Swan GunnarSwan at PracticeToPass.com
Wed Jun 4 16:11:07 CDT 2003


Check the data type of field "Amount"
Experiment with different data types on this field.
If I remember correctly, Aggregate functions did not work with some field types. 
Again, my feeble memory, but I remember we had to change the field type to get things to sum correctly.

Also, I think you will need to use ORDER BY, and sort records according to GROUP.
Other databases all you to skip ORDER BY .. it's implied. Valentina ( I think ) requires ORDER BY.

Also, I think it was particular ... it wanted ORDER BY first in SQL, then GROUP BY.
In any case, once we went through these items, it worked perfect.

Gunnar.


6/4/03 4:00:52 PM, Stan Busk <maxprog at mac.com> wrote:

>I meant
>
>  SELECT Sum(Amount),Type1,Type2
>    FROM Accs
>    WHERE Type1='3' OR Type2='3'
>    GROUP BY Type1, Type2
>
>Sorry,
>~/Stan
>
>>  SELECT Sum(Amount)
>>    FROM Accs, Type1, Type2
>>    WHERE Type1='3' OR Type2='3'
>>    GROUP BY Type1, Type2
>
>_______________________________________________
>Valentina mailing list
>Valentina at lists.macserve.net
>http://lists.macserve.net/mailman/listinfo/valentina
>


Best Regards,
Gunnar Swan
http://www.PracticeToPass.Com





More information about the Valentina mailing list