Subject | Re: SQL for master-detail |
---|---|
Author | Dan Cooperstock |
Post date | 2007-12-27T19:23:34Z |
--- In firebird-support@yahoogroups.com, Gabor Boros <gaborboros@...>
wrote:
NOT EXISTS would be a good solution if the original request was to find
all Master records that have no associated Detail records. But the
actual request was to find all Master records that have either 0 or 1
detail records. That's why my solution is correct and the NOT EXISTS
solution is not correct.
wrote:
>detail
> Hi,
>
> NOT EXIST is not a good solution for the problem.
>
>
> Gabor
>
> >>> I am looking for all of the master records that have one or no
NOT EXISTS would be a good solution if the original request was to find
all Master records that have no associated Detail records. But the
actual request was to find all Master records that have either 0 or 1
detail records. That's why my solution is correct and the NOT EXISTS
solution is not correct.