Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
autumnbernier #1
Query results - grouping
I am sure there is an easy answer to this, but I am stumped!
I have a query pulling in these fields: Area, Heading, Year, IndustryGroup
(Year and IndustryGroup are not an issue as they are utilizing WHERE summaries)
I need the cfoutput to group by Area and Heading - BUT I want the Area to only
be displayed once, and then the Heading(s) to list beneath that.
I want it to look like this:
Foreign Trade Committee (this is an Area)
Committee Information (these are the Headings)
Communications
Meeting Minutes
Taiwan
But currently, this is what my query is doing
Foreign Trade Committee
Committee Information
Foreign Trade Committee
Communications
Foreign Trade Committee
Meeting Minutes
And so on..I am sure you get the idea. There are a number of areas that will
be listed with a number of Headings under each area.
Can anyone please help me with this? Below is the cfquery code in case this
helps.
Attach Code
SELECT IndustryGroup, "Year", Area, Heading
FROM tbl_industryarchives
WHERE "Year" = '#URL.Year#'
AND IndustryGroup = '#URL.Group#'
AND Area <> 'Activity'
GROUP BY Area, Heading, "Year", IndustryGroup
ORDER BY Area, Heading ASC
autumnbernier Guest
-
Grouping results in CFMAIL
Hi there, I am using MX7 and trying to send a mail that contains the content of a grouped query, grouping the results by date like this: Date1... -
Help with grouping and sum in query
My query looks like: <cfquery name="getTotals" datasource="db"> SELECT SUM(Extension) AS TotalDayBilling, DatePart(dw, TimesheetDate) AS... -
Grouping results with ASP from Access DB
I found this topic doing a search and it answered my question exactly. The code seems to do what I was looking for but there's one strange issue:... -
Grouping DB Results
Hi, I'm using ASP with an Access database to track the user's usage of a Data Entry program. Each time the user inputs data, a record is made... -
Grouping Query Results
"John Smith" <3rtwemte001@sneakemail.com> wrote in message news:1p5khvc1kd5qatngsm6mfvvcq0ehn763va@4ax.com... Well im not sure what you want. ...



Reply With Quote

