Consultor Eletrônico



Kbase P110104: LEAVE statement leaves other block than expected
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/16/2007
Status: Unverified

SYMPTOM(s):

Using FOR block (FOR EACH, FOR FIRST, FOR LAST)

Using ROWID or RECID in where clause

LEAVE statement in FOR block leaves outer block

CAUSE:

This is expected behavior.

When a FOR EACH/LAST/FIRST is seen to contain a ROWID condition, it is optimized into a NON-ITERATING block, which then causes the LEAVE to act as though it belongs to an outer block.

FIX:

In any cases where there are multiple possibilities for a LEAVE statement to resolve to, always supply a label for the block.