> > how can i exclude true values for this query?
> >
> > http://www.rafb.net/paste/results/obtkGz26.html
> >
> > if i uncomment out
> >
> > -- AND t_inspect_result.inspect_result_pass = 'f'
> >
> > it looks for prior falses within an inspect_id and
> > returns it. i want the original result set minus
> > the
> > trues, if possible.
> >
> > tia...
>
> this SQL appears to do the trick...
>
> http://www.rafb.net/paste/results/zZKIjH80.html
I have one idea that hopefully wont complicate you query but it could simplfy your query by
getting rid of the query nexting. Also, I haven't tested it.
Basically, Replace the
DISTINCT ON (t_inspect.inspect_id)
construct with
GROUP BY t_inspect.inspect_id
HAVING t_inspect_result.inspect_result_pass = 'f'
Regards,
Richard Broersma Jr.