At 09:04 AM 8/20/2006, Jochem van Dieten wrote:

>SELECT
>   a.accountID,
>   a.accountName,
>   a.accountDebits,
>   SUM(a.accountDebits) AS TotalSpent
>FROM
>   account_tb a
>WHERE
>   a.accountID = 222222
>GROUP BY
>   a.accountID,
>   a.accountName,
>   a.accountDebits


Thank you for a prompt response. I tried that by now my TotalSpent 
variable shows each individual expense next to the other in an 
continuous string:

100100100200100300100

....instead of the mathematical sum of those amounts. Is that related 
to the GROUP part? What does the GROUP BY do in this case (I'm 
assuming it is not related to the GROUP that you use to arrange output)?

Thanks,

Roberto 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250401
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to