programmher
Programmer
I have a simple query:
<cfquery name="Tabulate">
Select Guest, Charge, Amount, Date
From InnTable
Where guest = 'jones'
</cfquery>
My result looks something like this:
Jones Cable TV 25.00 08/01/01
Jones Phone .75 08/03/01
Jones Phone .75 08/10 01
I want my result to look like this:
Jones 26.50
When I run this in query analyzer and either use a SUM or Order BY, I get my desired result.
But, when I run this from my webpage, I am unable to get my fields to sum.
I suspect something is amiss with my cfoutput. I used <cfoutput query="Tabulate" group="Guest"> Then I attempt to group by "Charge" but to no avail.
What am I missing?
<cfquery name="Tabulate">
Select Guest, Charge, Amount, Date
From InnTable
Where guest = 'jones'
</cfquery>
My result looks something like this:
Jones Cable TV 25.00 08/01/01
Jones Phone .75 08/03/01
Jones Phone .75 08/10 01
I want my result to look like this:
Jones 26.50
When I run this in query analyzer and either use a SUM or Order BY, I get my desired result.
But, when I run this from my webpage, I am unable to get my fields to sum.
I suspect something is amiss with my cfoutput. I used <cfoutput query="Tabulate" group="Guest"> Then I attempt to group by "Charge" but to no avail.
What am I missing?