All,
I have a need to retrieve the last record for a particular account id, and the second to last record for the same account id.
the tables involved are
TblAccountInformation
Fields - AccountID, AccountName
tblInvoiceTransactions
Fields - AccountID(links to tblAccountInformation),TransactionID,RecievedDate.
The field i need to retrieve is the RecievedDate. I need the Lastdate and second to last date retrieved.
Sample data
Account ID TransactionID RecievedDate
1 250 4/21/04
1 265 6/21/04
1 400 7/21/04
1 433 9/21/04
Based on the example above, i need to get the following information
Account ID TransactionID RecvdDate
1 400 7/21/04
1 433 9/21/04
How can I do this. I know how to get the last date, i have achieved this by running a query and using the (Last)option to get the last date for each account id. How can I get the second to last date.
Thanks for your help everyone
Steve
I have a need to retrieve the last record for a particular account id, and the second to last record for the same account id.
the tables involved are
TblAccountInformation
Fields - AccountID, AccountName
tblInvoiceTransactions
Fields - AccountID(links to tblAccountInformation),TransactionID,RecievedDate.
The field i need to retrieve is the RecievedDate. I need the Lastdate and second to last date retrieved.
Sample data
Account ID TransactionID RecievedDate
1 250 4/21/04
1 265 6/21/04
1 400 7/21/04
1 433 9/21/04
Based on the example above, i need to get the following information
Account ID TransactionID RecvdDate
1 400 7/21/04
1 433 9/21/04
How can I do this. I know how to get the last date, i have achieved this by running a query and using the (Last)option to get the last date for each account id. How can I get the second to last date.
Thanks for your help everyone
Steve