Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: Kapitaine
Hi Dan, that UNION sounds like a good idea for a situation like this, but in my particular instance it's just not possible. I'm curious though, how would grouping work with a UNION query? Is it any different?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: Newsgroup User
Ian Skinner wrote:
Here is a super simple correction to my original ...
> super simple sample.
>
> <cfoutput>
> <cfset aFieldValue = "">
> <cfloop query="myQuery">
> <cfif myQuery.aField NEQ aFieldValue>
> <!--- output grouped content here, once per value of aField. --->
> #myQuery.aField#
<cfset aFieldValue = myQuery.aField> <!--- new line --->
> </cfif>
> <!--- output content here for every record.
> #myQuery.bField#
> </cfloop>
> </cfoutput>
Copy link to clipboard
Copied