From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
---|---|
To: | operationsengineer1(at)yahoo(dot)com, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: How To Exclude True Values |
Date: | 2006-06-06 02:36:18 |
Message-ID: | 20060606023618.18392.qmail@web31815.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> > 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2006-06-06 11:10:37 | Re: Update Problem |
Previous Message | operationsengineer1 | 2006-06-06 02:24:25 | Re: How To Exclude True Values |