aziz rasul
Active member
- Local time
- Today, 09:01
- Joined
- Jun 26, 2000
- Messages
- 1,935
How are the First and Last functions different to the Min and Max functions.
If I have a table with values placed in a new table: -
3
5
1
2
4
6
the Min and Max functions produce 1 and 6 respectively. However the First and Last functions return values based on the order that the entries were made. The First function will return 3 and the Last function will return 6.
If I now place an index on the above field in ascending order so that I get:-
1
2
3
4
5
6
the First and Last function still return the same values as above, hence it seems to remember the order in which the entries were made AND IGNORES the actual values themselves and the order that they are in.
Hence my question really is what is the purpose of the First and Last functions? How and where is it used? The online help does say that you can obtain ambigious results but doesn't really explain why this should be. Any clarification would help.
If I have a table with values placed in a new table: -
3
5
1
2
4
6
the Min and Max functions produce 1 and 6 respectively. However the First and Last functions return values based on the order that the entries were made. The First function will return 3 and the Last function will return 6.
If I now place an index on the above field in ascending order so that I get:-
1
2
3
4
5
6
the First and Last function still return the same values as above, hence it seems to remember the order in which the entries were made AND IGNORES the actual values themselves and the order that they are in.
Hence my question really is what is the purpose of the First and Last functions? How and where is it used? The online help does say that you can obtain ambigious results but doesn't really explain why this should be. Any clarification would help.