J
Jake
Hi,
This query extracts records fine, but produces duplicate values in the
Tencount field. The Amndt No field contains values from 0 to 171 that track
amendments. A record can have the same Tencount number but different
Amendment numbers. I would like the query to not produce duplicate records
based on the Tencount field and in the duplicate records only choose to
extract the record with highest amendment number. The user should be able
to extract records less than or equal to a certain amendment number and only
get the highest amendment number for that Tencount. I've tried using a Max
function on the ammendment number and setting the query to Unique Values or
Unique Records without success. Here is the query I'm using:
SELECT DISTINCTROW tblFARZeroSectPlus.strFAR25para, tblFARZeroSectPlus.[Sect
No], tblFARZeroSectPlus.Tencount, tblFAR25AmndtListSections.Subject,
tblFAR25AmndtListSections.Statement, tblFAR25AmndtListSections.[Amndt No],
tblFAR25AmndtListSections.Decade
FROM tblFARZeroSectPlus INNER JOIN tblFAR25AmndtListSections ON
tblFARZeroSectPlus.[Sect No] = tblFAR25AmndtListSections.[Sect No]
WHERE (((tblFAR25AmndtListSections.[Amndt No])<=50))
ORDER BY tblFARZeroSectPlus.Tencount, tblFAR25AmndtListSections.[Amndt No]
DESC , tblFAR25AmndtListSections.Decade DESC;
It's arbitrarily set to extract amendments less than or equal to 5.
Thanks for any help,
Cheers!
Jake
This query extracts records fine, but produces duplicate values in the
Tencount field. The Amndt No field contains values from 0 to 171 that track
amendments. A record can have the same Tencount number but different
Amendment numbers. I would like the query to not produce duplicate records
based on the Tencount field and in the duplicate records only choose to
extract the record with highest amendment number. The user should be able
to extract records less than or equal to a certain amendment number and only
get the highest amendment number for that Tencount. I've tried using a Max
function on the ammendment number and setting the query to Unique Values or
Unique Records without success. Here is the query I'm using:
SELECT DISTINCTROW tblFARZeroSectPlus.strFAR25para, tblFARZeroSectPlus.[Sect
No], tblFARZeroSectPlus.Tencount, tblFAR25AmndtListSections.Subject,
tblFAR25AmndtListSections.Statement, tblFAR25AmndtListSections.[Amndt No],
tblFAR25AmndtListSections.Decade
FROM tblFARZeroSectPlus INNER JOIN tblFAR25AmndtListSections ON
tblFARZeroSectPlus.[Sect No] = tblFAR25AmndtListSections.[Sect No]
WHERE (((tblFAR25AmndtListSections.[Amndt No])<=50))
ORDER BY tblFARZeroSectPlus.Tencount, tblFAR25AmndtListSections.[Amndt No]
DESC , tblFAR25AmndtListSections.Decade DESC;
It's arbitrarily set to extract amendments less than or equal to 5.
Thanks for any help,
Cheers!
Jake