Subject Re: (thank you!!) Looking for help with query and SINGULAR
Author nitaligavino
Hello:
Just wanted to thank you and Helen for the help. Your suggests did
the trick.

--- In ib-support@yahoogroups.com, Svein Erling Tysvaer
<svein.erling.tysvaer@k...> wrote:
>
> >Anyway, I thought the following would work:
> >
> >SELECT * FROM Media WHERE MAction = 2
> >AND NOT EXISTS (SELECT * FROM Media WHERE MAction = 1)
>
> That's very close, Dan, but it checks that there exists no record
in the
> entire table with MAction = 1. Change your code to
>
> SELECT * FROM Media M WHERE MAction = 2
> AND NOT EXISTS (SELECT * FROM Media M2 WHERE M2.MAction = 1 and
M2.MStoreId
> = M.MStoreId)
>
> and it should return what you want.
>
> Set