>And SUM is not working? AFAIK the result of datediff should be an int
>(Not that I use access a lot). You can always calculate the sum in CF.
>
><cfset sum = 0>
><cfoutput query="q">
>  <cfset sum = sum + Val(q.no_of_minutes)>
>...
></cfoutput>

I get the following error w hen I insert your example:

The value of the attribute query, which is currently "q", is invalid.

=============================

Here's my query if it helps:

<CFQUERY NAME="readesi" DATASOURCE="esitest">
SELECT tblclientdailies.ClientName, acctstatus, dailiesdate, postagesentto, noofcopies, postagesite,
confhrsused, confhrsfrom, confhrsto, confroom, postagecost, misc, miscdesc, faxin, faxout,

DATEDIFF('n', confhrsfrom, confhrsto) AS no_of_minute,
SUM(postagecost) AS totalpostage,
SUM(confhrsused) AS totalhours

FROM  tblclientdailies, tblclients
where tblclients.clientname = tblclientdailies.clientname
and   tblclients.acctstatus = 'A'
and dailiesdate BETWEEN #Date1# AND #Date2#
and tblclientdailies.clientname like '%marsh%'

GROUP BY tblclientdailies.ClientName, acctstatus, dailiesdate, postagesentto, noofcopies, postagesite,confhrsused,
confhrsfrom, confhrsto, confroom, postagecost, misc, miscdesc, faxin, faxout,

DATEDIFF('n', confhrsfrom, confhrsto)
order by dailiesdate

</CFQUERY>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to