I have a SQLServer7 question I hope you can help me with.  (why not, you
guys have never failed to help me in the past!)

I have a chart drawing data from a database, comparing specific models of
dishwashers against benchmarks.  I'm going to show a particular model and
how some aspects of the machine compare to the biggest and the smallest
non-zero value of things like drying test score, washing ability, ease of
use etc ec.. Not all the models in the database have been tested, so they
don't all have values.

I'm selecting the various scores from the database with (to quote just one
of  about 30 scores):

SELECT

min(DryingScore) ,
max(yada),
min(yada),
min(yada),


FROM Dishwashers

WHERE  0=0


How do I get not the minimum value, but the minimum non-zero?   The only way
I can think of is to have  a host of queries, each  as follows:

Select   min(DryingScore)  FROM Dishwashers WHERE  dryingscore > 0

But that's about 30 queries.  IS there a more efficient way to do that?

Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks



Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to