Subject Re: [IBO] Not IBO related, but IB related
Author Flipado
It's another option, but the list of NOT EXISTS will be bigger (more
than 25 tables refers to A).


--- In IBObjects@y..., Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
> Filipado,
> what about something like
>
> UPDATE A
> SET GroupCode = :NewValue
> WHERE A.Code = :Code AND
> NOT EXISTS (SELECT 1 FROM B WHERE B.SomeField = A.Code) AND
> NOT EXISTS (SELECT 1 FROM C WHERE C.SomeField = A.Code) AND
> NOT EXISTS (SELECT 1 FROM D WHERE D.SomeField = A.Code)
>
> But be a bit careful with your transactions, so that no-one can
insert the
> old value into B, C or D simultaneously with someone else updating
A.
>
> HTH,
> Set
>
> BTW, this question would probably have gotten more replies at
> ib-support@y...