--- Stephen Clouse <stephenclouse@gmail.com> wrote:
> On 1/6/06, operationsengineer1@yahoo.com
> <operationsengineer1@yahoo.com>
> wrote:
> >
> > 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
>
>
> This should get you what you're looking for:
>
> SELECT sn FROM t_sn
> WHERE sn_id NOT IN
> (SELECT sn_id FROM t_inspect
> WHERE inspect_pass = t)
perfect! thank you Stephen! so concise, too.
beautiful!
i was misapplying "not exists" and it was a mess. i
had it displaying all or none of the sns.
my last hurdle is to make my query also sort by
inspection area... and i'll attack that tomorrow.
thanks again.
__________________________________________
Yahoo! DSL Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com