[Top] [All Lists]

Re: problem using DISTINCT

Subject: Re: problem using DISTINCT
From: "brianism"
Date: Fri, 17 Aug 2007 15:17:19 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
Thanks for the help everyone.  I am still struggling with this though.....I 
change the type for wh_standard to "yes/no" in Access. Then I tried this 

 <cfquery name="getstroke" datasource="mydb">
 SELECT max_stroke_mm, MAX(wh_standard) AS itisstandard
 FROM presses
 WHERE model_head LIKE '#headmodel#%'
 GROUP BY max_stroke_mm
 ORDER BY max_stroke_mm</cfquery>

 <select style="padding:0px;margin:0px;" name="max_stroke_mm">
            <cfoutput query="getstroke">
                   <option <cfif itisstandard NEQ 
value="#max_stroke_mm#">#max_stroke_mm# mm <cfif itisstandard NEQ 

 It is not duplicating, which is good. But it is adding the (standard) to items 
that are not standard.  I double checked the database to make sure there wasn't 
at least one duplicate max_stroke_mm record that would make it show standard 
and there is not.

 I'm stumped.

<Prev in Thread] Current Thread [Next in Thread>