What I thought would be a simple, single table select keeps eluding me.
I've looked in Rick van der Laans' book and the Joe Celko books here and
have not learned how to write the query.
The table has a Boolean indicator column with values of 0 or 1 for each
row in the table and another attribute column for parameter names. I need to
find all parameter names where the indicator value is only 0 for all rows of
that parameter. At least some of the parameters have both rows with 0 and
rows with 1 in the indicator attribute. I want to find all (any?) that have
I have tried various flavors of this non-working syntax:
SELECT DISTINCT(param) from table WHERE indicator = 0 and indicator <> 1
order by param;
and have not found the correct way of writing this either directly or as a
correlated query. The proper syntax must not be complicated and I would
appreciate learning how to write it.