Yes this was a nice trick, I plugged it into a local
table and found I could even go 1 step further and
Nest the groups. Thanks for the tip!
Here is my nested group clip:
<cfquery datasource="DB1" name="test">
select DISTINCT department, wonum, sublocation1
from woeqlist
WHERE DEPARTMENT <> ''
and location <> 'RMRS'
order by department, sublocation1, wonum
</cfquery>
<cfoutput query="test" group="department">
<b><font size="+1">#department#</font></b><br>
<cfoutput group="sublocation1">
<b>
<font size="+1">#sublocation1#</font></b>
<br>
<cfoutput>
#wonum# </cfoutput> <br>
</cfoutput>
<br>
</cfoutput>
--- Michael Kear <[EMAIL PROTECTED]> wrote:
> Well DOH!! Too many late nights, not enough
> concentration. You're quite
> right, Jaime, it was working fine, and I didn't
> notice I had
>
> Make Model
> Model
> Model
> Make Model
> Model
> Model
>
> It was indeed formatting. Thanks.
>
> I think I'll go take my red blushing face off to bed
> to have a lie down
> now.
>
> Cheers,
> Mike Kear
>
>
> On Mon, 13 Nov 2000, Jaime Garza wrote:
>
> > I tried Rick's query and it works fine. Unless we
> are talking about
> > formatting. Then this works in the data I modeled
> (based again on Rick's)
> >
> > <CFQUERY NAME="getmodels" DATASOURCE="#dsn#">
> > SELECT ANCAPID, model, make
> > FROM ANCAPCrashTests
> > ORDER BY make, model, ANCAPID
> > </cfquery>
> >
> > <table border=1>
> > <cfoutput query="getmodels" group="make">
> > <tr>
> > <td valign=top>#Make#</td>
> > <td>
> > <cfoutput>
> > #model# - #ancapid#<br>
> > </cfoutput>
> > </td>
> > </tr>
> > </cfoutput>
> > </table>
> >
> >
> >
> > <Jaime/>
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> > > Behalf Of Michael Kear
> > > Sent: Monday, November 13, 2000 6:54 PM
> > > To: CF-Talk
> > > Subject: RE: CFLOOP has me stumped again.
> > >
> > >
> > > Thanks a lot to Rick and Jaime, but I'm not
> quite there yet. I was right
> > > about being so close to the trees I couldn't see
> the wood. I had
> > > forgotten about the 'group' attribute of
> CFOUTPUT tags. However using
> > > every combination I can think of, the best I can
> get is:
> > >
> > > Make1 model1
> > > Make1 model2
> > > Make1 model3
> > > Make2 model1
> > > Make2 model2 etc
> > >
> > >
> > > When what I want to achieve is
> > >
> > > Make1 model1-1
> > > model1-2
> > > model1-3
> > >
> > > Make2 model2-1
> > > model2-2
> > >
> > > Make3 model3-1
> > >
> > > etc
> > >
> > > Any other suggestions?
> > >
> > > Cheers,
> > > Mike Kear
> > >
> > > On Mon, 13 Nov 2000, Rick Lamb wrote:
> > >
> > > > First off, there is no point in grouping your
> sql query by all
> > > the fields.
> > > > This does nothing, and remember that there is
> a very big
> > > difference when you
> > > > use grouping in sql then when you use grouping
> in cold fusion.
> > > I'll let you
> > > > look into the sql group, but here is how i
> would use a cold
> > > fusion grouping
> > > > to get the display you want:
> > > >
> > > > <CFQUERY NAME="getmodels" DATASOURCE="#dsn#">
> > > > SELECT ANCAPID, model, make
> > > > FROM ANCAPCrashTests
> > > > ORDER BY Make, model, ancapid
> > > > </query>
> > > >
> > > > <cfoutput query="getmodels" group="make">
> > > > #Make#
> > > > <cfoutput>
> > > > #model# - #ancapid#
> > > > <cfoutput>
> > > > </cfoutput>
> > > >
> > > > Rick
> > > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> > > > Behalf Of Michael Kear
> > > > Sent: Monday, November 13, 2000 7:37 PM
> > > > To: CF-Talk
> > > > Subject: CFLOOP has me stumped again.
> > > >
> > > >
> > > > I'm sorry if this is a very elementary CFLOOP
> question, but perhaps I've
> > > > been looking at this one so long now I can't
> see the wood for
> > > the trees so
> > > > to speak.
> > > >
> > > > I have a query that gives me Make, Model and
> ID of a range of cars. I
> > > > want to display them on the page as follows:
> > > >
> > > > make1 model 1-1
> > > > model 1-2
> > > > model 1-3
> > > > model 1-4
> > > >
> > > > make2 model 2-1
> > > > model 2-2
> > > > model 2-3
> > > >
> > > > make3 model 3-1
> > > > model 3-2
> > > >
> > > > etc
> > > >
> > > >
> > > > In other words grouped by the car
> manufacturer, with each manufacturer's
> > > > models in sequence.
> > > >
> > > > My SQL query is:
> > > >
> > > > <CFQUERY NAME="getmodels" DATASOURCE="#dsn#">
> > > > SELECT ANCAPID, model, make
> > > > FROM ANCAPCrashTests
> > > > GROUP BY ancapid, model, make
> > > > ORDER BY Make, model, ancapid
> > > > </query>
> > > >
> > > > So I believe the way I display the data is
> using CFLOOP but I'm
> > > dashed if
> > > > I can work out what I have to do with CFLOOP
> to give me the
> > > result I need.
> > > >
> > > > Anyone? please?
> > > >
> > > > Cheers,
> > > > Mike Kear
> > > > Windsor, NSW, Australia
> > > > Australian Consumers Assoc
> > > > http://www.choice.com.au
> > > >
> > > >
> > >
>
------------------------------------------------------------------
> > > ----------
> > > > --------------------
> > > > Archives:
>
http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > > > Unsubscribe:
> >
> http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send a
> > > message with 'unsubscribe' in the body to
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]