Don't forget your order by

<CFQuery name="test" datasource="#application.test#">
  SELECT        FieldOne
                FieldTwo
  FROM  Test
  ORDER BY FieldOne
</CFQuery>

<CFOutput query="test" group="FieldOne">
#FieldOne# - #FieldTwo#
<CFoutput>
 - #FieldTwo#
</CFOutput>
</CFOutput>

Thank you,
Katrina Chapman
ColdFusion Web Developer
Systems Development



-----Original Message-----
From: Mark Armendariz [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 07, 2000 9:55 AM
To: [EMAIL PROTECTED]
Subject: RE: Formatting Data


I'm not sure if this is what you're looking for, but try useing grouped
outputs:

<CFQuery name="test" datasource="#application.test#">
  SELECT        FieldOne
                FieldTwo
  FROM  Test
</CFQuery>

<CFOutput query="test" group="FieldOne">
#FieldOne# - #FieldTwo#
<CFoutput>
 - #FieldTwo#
</CFOutput>
</CFOutput>

I apologize for the sloppyness of the example, but i hope you get the idea..

Mark
-----Original Message-----
From: Miriam Hirschman [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 07, 2000 12:48 PM
To: CF Forum
Subject: Formatting Data


I have a collection to pull up records based on a text string that a user
types in.  My queries based on my collection return the correct data.
However, the data is like this

a       b
a       c
a       d
b       q
c       s
c       w
d       r
e       t
e       b
  I want it to be like this

a       b
        c
        d
b       q
c       s
        w
d       r
e       t
        b

I tried loop and anything I can think of so that I can dispaly may data like
that,but I am at a loss.

Any help would be appreciated.


Thanks,
 
     ---miriam

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=sts&body=sts/cf_talk or send
a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to