Consultor Eletrônico



Kbase P49500: Is it possible to have a query that includes FIRST and the L
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/10/2003
Status: Unverified

GOAL:

Is it possible to have a query that includes FIRST and the LAST record of a table?

FIX:

No, it is not possible, you have to run two separate query. However you could consider to use an additional table field in which you store this information. For example, a integer field that is set 1 for the first record, 2 for the last and 0 for all the others.
In this case you can have a query like:

FOR EACH recordname WHERE position > 0.

Please note that you have to maintain up to date this field when changing, adding or deleting record from the table. So that this field always contains the correct information about the FIRST and the LAST record.