SQL Question - Mailing list pgsql-novice

From
Subject SQL Question
Date
Msg-id 20060107000253.90083.qmail@web33310.mail.mud.yahoo.com
Whole thread Raw
Responses Re: SQL Question  (Michael Fuhr <mike@fuhr.org>)
Re: SQL Question  (Stephen Clouse <stephenclouse@gmail.com>)
With auto vacuum, is analyze still necessary?  (Brendan Duddridge <brendan@clickspace.com>)
List pgsql-novice
and another sql question...

greatly simplified info:

t_sn
sn_id
sn

t_inspect
inspect_id
sn_id (fkey)
inspect_pass (boolean)

i want to display all sns where there is not a single
instance of inspect_pass = t

iow, a sn may have 1 inspection - t or 4 inspections -
f, f, f, t or any number of inspections as long as
they are 1. all f or 2. they are f up until the final
t value.

in php, i'd run a select where inspect_pass = true and
test to see if the recordset contained a value or not.

in this case, it is required that sql itself generate
the correct result, if possible.

tia...

my app actually has about 6 distinct test areas, each
requiring this test, but i thought i'd KISS it so the
request is clear.  eventually, i will want to test
that all prior inspections ended in t before allowing
the user to input the current inspection...

app minutae can wear a guy down!



__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com


pgsql-novice by date:

Previous
From: Andrew Chambers
Date:
Subject: Re: Problem when trying to compile and link program on Windows to libpq
Next
From:
Date:
Subject: primary key on lower(varchar)