Hi Chris,
Yeah, I might need to do that. Someone else suggested the same to me
off-list. After punching thru my Access Bible a couple of times, it doesn't
appear to me that I can do what I wanted in one query. Another way I've
solved this type of thing in the past is to run two queries - one to get the
totals, and a second to retrieve the other stuff to display. I may need to
go back to the old way.
Thanks for the reply.
Chris Montgomery [EMAIL PROTECTED]
Web Development & Consulting http://www.astutia.com
Allaire Consulting Partner
210-490-3249/888-745-7603 Fax 210-490-4692
AIM: astutiaweb; ICQ: 7381282; Firetalk: Ag78
> -----Original Message-----
> From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 5:18 PM
> To: CF-Talk
> Subject: RE: A little help with aggregate query, please?
>
>
> your sum is being GROUPed by each individual donor. it might be more
> advantageous to calculate it yourself while looping through the
> "individual
> donors" query.
>
> ex: query
>
> <cfquery name="GetReportInfo" datasource="tjf" dbtype="ODBC">
> SELECT
> Donors.ID, Donors.Fname, Donors.MI, Donors.Lname,
> Donations.DateDonated,
> Donations.AmountDonated,
> FROM Donors, Donations
> WHERE Donors.ID = Donations.DonorID AND Donations.DateDonated Between
> #CreateODBCDate(StartDate)# and #CreateODBCDate(EndDate)#
> ORDER BY Donors.ID, Donors.Fname, Donors.MI, Donors.Lname,
> Donations.DateDonated
> </cfquery>
>
> then in your output...
>
> <CFSET numdonors = 0>
> <CFSET totaldonations = 0>
>
> <cfoutput query="GetReportInfo">
>
>
>
> <CFSET numdonors = numdonors + 1>
> <CFSET totaldonations = totaldonations + getReportInfo.amountdonated>
>
> </CFOUTPUT>
>
> your totals will be in these two variables to display at your leisure.
>
>
> chris olive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists