Or as Brian said, just use SELECT DISTINCT FROM XXX
----- Original Message -----
From: "David Gassner" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, October 27, 2000 8:56 PM
Subject: RE: Suppressing Repeating Groups in a Query
> Sam, track the current value of the repeating field in a local variable;
on
> each loop, check whether the repeating field value has changed, and react
> accordingly:
>
> <cfset currentID = 0>
> <cfoutput query="myquery">
> <tr>
> <cfif myquery.ID is currentID> <!--- if it's repeated --->
> <td></td><td></td>
> <cfelse> <!--- if it's new --->
> <td>#myquery.id#</td><td>myquery.field2</td>
> <cfset currentID = myquery.ID>
> </cfif>
> <td>#myquery.statename#</td>
> </tr>
> </cfoutput>
>
> > -----Original Message-----
> > From: sam komolafe [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 27, 2000 2:07 PM
> > To: CF-Talk
> > Cc: sam komolafe
> > Subject: Suppressing Repeating Groups in a Query
> >
> >
> > Hi guys,
> >
> > How do you suppress repeating groups in a query? e.g.
> >
> > What I Have:
> > 1 DN12 California
> > 1 DN12 Oregon
> > 5 DQ46 Utah
> > 5 DQ46 New York
> > 9 DZ09 Texas
> >
> > What I Want:
> > 1 DN12 California
> > Oregon
> > 5 DQ46 Utah
> > Utah
> > 9 DZ09 Texas
> >
> > Thanks
> >
> > ------------------------------------------------------------------
> > ------------------------------
> > Archives: http://www.mail-archive.com/[email protected]/
> > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> > or send a message with 'unsubscribe' in the body to
> > [EMAIL PROTECTED]
> >
>
> --------------------------------------------------------------------------
----------------------
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
>
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]