Re: How To Exclude True Values

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: How To Exclude True Values
Дата
Msg-id 20060606023618.18392.qmail@web31815.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: How To Exclude True Values  (<operationsengineer1@yahoo.com>)
Ответы Re: How To Exclude True Values
Список 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.


В списке pgsql-sql по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: How To Exclude True Values
Следующее
От: "Christian Paul Cosinas"
Дата:
Сообщение: Update Problem