[Top] [All Lists]

Re: problem using DISTINCT

Subject: Re: problem using DISTINCT
From: "Avatar"
Date: Thu, 16 Aug 2007 21:32:28 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
Since you are only checking if wh_standard is yes, then cf_dev2's query without 
the case statement would work, if there is ever a "Yes" than that will always 
be the Max value.

 SELECT max_stroke_mm, MAX(wh_standard) AS wh_standard
 FROM presses 
 WHERE model_head LIKE '#headmodel#%' 
 GROUP BY max_stroke_mm
 ORDER BY max_stroke_mm

 <option <cfif wh_standard EQ "yes">style="background-color:00FF00"</cfif> 
value="#max_stroke_mm#">#max_stroke_mm# mm (standard)</option>

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