tuarek wrote:
Thanks Serge...
Mark:
First & Last functions are aggregate functions like Min,MAX and SUM.
They return the first/last values from the result set returned by the
query.
The thing is that SQL is a set-oriented languages and the elements in a set
have - per definition - no order. So the terms "first" and "last" row are
completely meaningless, unless you impose a specific order in which the
rows are to be retrieved. And once you have such an order, the FETCH FIRST
n ROWS clause that Serge mentioned, should give you exactly what you want.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany