name of your query (esitest)!!!
Are you sure adding SUM(DATEDIFF('n', confhrsfrom, confhrsto)) in your
select doesn't work?
Although it looks like the SUM functions won't do much, as your group by
will probably return individual records.
I think you may need two queries here. What are you trying to achieve?
> -----Original Message-----
> From: hammerin hankster [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 1 juni 2004 16:41
> To: CF-Talk
> Subject: Re: SUM/Convert string numeric data
>
> >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]

