macroCharlie
Programmer
I am trying to find the latest ten records from a table on 3 fields. There can be a multiple number of combinations of the first two fields with each record having a date. Example:
SELECT txtField1, txtField2, dtField3
FROM table
ORDER BY 1, 2, 3 DESC
This gives me all the records but all I want is the latest 10 records fom all the combinations of txtField1 and txtField2. Let's say txtField1 has 6 distinct values and txtField2 has 3 distinct values. This gives me 18 different combinations of txtField1 and txtField2. Now if I add the date field all I want is the latest 10 records from each combination. This would give me a total of 180 records. Any coding suggestions?
SELECT txtField1, txtField2, dtField3
FROM table
ORDER BY 1, 2, 3 DESC
This gives me all the records but all I want is the latest 10 records fom all the combinations of txtField1 and txtField2. Let's say txtField1 has 6 distinct values and txtField2 has 3 distinct values. This gives me 18 different combinations of txtField1 and txtField2. Now if I add the date field all I want is the latest 10 records from each combination. This would give me a total of 180 records. Any coding suggestions?