Subject | RE: [ib-support] Wrong codeflow in SP. Possible bug |
---|---|
Author | Dmitry Yemanov |
Post date | 2002-10-22T10:19:49Z |
Andrew,
if (Qty > 0) then
begin
if (exists (select docid from Closed_Docs where DocID = :d))
then exception xcptdoc_closed;
end
else
begin
if (exists (select DocRow from Reserves where DocRow = :DocRow
and Term >= 'NOW' and AuthorID <> :E))
then exception XCPT_RESERVED;
end
HTH,
Dmitry
> if (Qty > 0) thenUse BEGIN..END to avoid an ambiguity in your statements:
> if (exists (select docid from Closed_Docs where DocID = :d))
> then exception xcptdoc_closed;
> else
> if (exists (select DocRow from Reserves where DocRow = :DocRow
> and Term >= 'NOW' and AuthorID <> :E))
> then exception XCPT_RESERVED;
if (Qty > 0) then
begin
if (exists (select docid from Closed_Docs where DocID = :d))
then exception xcptdoc_closed;
end
else
begin
if (exists (select DocRow from Reserves where DocRow = :DocRow
and Term >= 'NOW' and AuthorID <> :E))
then exception XCPT_RESERVED;
end
HTH,
Dmitry