masoud_sedighy
Registered User.
- Local time
- Today, 00:57
- Joined
- Dec 10, 2011
- Messages
- 132
Hello
I like to make a query for extracting latest (max) rev of one list like below. But for catching this result I have made 3 queries
that are related
(one by one). So I have floated between queries with slow speed.
LIST:
Result:
For this result if have made 3 queries that are related.
1- First query for finding max rev of the list.(group and aggregate function)
2- Second query for finding max date that has been made with relating first query and list with joining (doc no, rev)
3- Third query for finding max transmittal , that has been made with relating second query and list .
So slow of third query that has my result is slow (some times around 17 second) , please help how I can make better query.
Best regards.
I like to make a query for extracting latest (max) rev of one list like below. But for catching this result I have made 3 queries
that are related
(one by one). So I have floated between queries with slow speed.
LIST:
Code:
DocumentNo title REV DATE TRANS
DW-1013 test 0 12-Dec-09 TT-3799
DW-1013 test 1 13-May-10 TT-5923
DW-1013 test 1 15-Apr-11 TT-5943
DW-1013 test 2 1-Jan-12 TT-6031
Code:
DocumentNo TITLE REV DATE TRANS
DW-1013 TEST 2 1-Jan-12 TT-6031
1- First query for finding max rev of the list.(group and aggregate function)
2- Second query for finding max date that has been made with relating first query and list with joining (doc no, rev)
3- Third query for finding max transmittal , that has been made with relating second query and list .
So slow of third query that has my result is slow (some times around 17 second) , please help how I can make better query.
Best regards.