I am developing an Access application using Access 2003 with an ADP type file wtih SQL Server 2005.
I currently use the following SQL statement to filter out records from one table named
blGetDocumentAttributes and place the result set into another table named tblGetDocumentAttributesMod.
select t1.* into dbo.tblGetDocumentAttributesMod from tblGetDocumentAttributes t1 left join tblGetDocumentAttributes t2 on t1.Account = t2.Account And t1.DocumentDate < t2.DocumentDate where t2.MailId is Null;"
What additional SQL Statement would you use if there are multipe records
in table tblGetDocumentAttributesMod wtih the same account field value and same
documentdate field value but with different MailID values and you only want to keep the
MailID (type nvarchar) value with the highest value for a particular account.