Subject | Re: [ib-support] Looking for help with query and SINGULAR |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-04-02T08:08:58Z |
>Anyway, I thought the following would work:That's very close, Dan, but it checks that there exists no record in the
>
>SELECT * FROM Media WHERE MAction = 2
>AND NOT EXISTS (SELECT * FROM Media WHERE MAction = 1)
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