Subject | Wrong codeflow in SP. Possible bug |
---|---|
Author | Andrew Guts |
Post date | 2002-10-22T10:06:13Z |
Hello IB support.
This is a fragment of my stored proc. Qty is an integer parameter. The
statement after "ELSE" is never executed. When I've replaced
"ELSE" by "if (Qty <= 0) then" it works as expected. What is wrong with it?
if (Qty > 0) then
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;
Thanks ahead.
Andrew
This is a fragment of my stored proc. Qty is an integer parameter. The
statement after "ELSE" is never executed. When I've replaced
"ELSE" by "if (Qty <= 0) then" it works as expected. What is wrong with it?
if (Qty > 0) then
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;
Thanks ahead.
Andrew