Consultor Eletrônico



Kbase P14110: FOR EACH statement with an OPEN QUERY inside it that fetches the same record via ROWID causes FOR EA
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Unverified

FACT(s) (Environment):

Progress 9.1x

SYMPTOM(s):

Doing a FOR EACH against a table

Inside the FOR EACH an OPEN QUERY statement is being executed against an alternate buffer for the same table as the FOR EACH with a WHERE clause that does a ROWID find of the same record as retrieved by the FOR EACH

The FOR EACH processes only a single record and then exits

CAUSE:

The FOR EACH statement uses field lists and the OPEN QUERY statement does not. This causes the FOR EACH to incorrectly process only a single record.

FIX:

There is no fix for this issue, however, the workaround would be to remove the FIELDS phrase from the FOR EACH statement.