Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1612
  • Last Modified:

Query to select last record

I have an access database that contains a table (table is Transactions_tbl) for all transactions for all customers.  I need to run a query that will pull only the most recent transaction (field is Transact_Date) for every customer  (field is Customer_ID) in the table.
0
sharringtoncpa
Asked:
sharringtoncpa
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:

select *
from Transactions_tbl
where Transact_Date in (select max(Transact_Date) from Transactions_tbl as T  where T.Customer_ID=Transactions_tbl.Customer_ID
0
 
Rey Obrero (Capricorn1)Commented:
select *
from Transactions_tbl
where Transact_Date in (select max(Transact_Date) from Transactions_tbl as T  where T.Customer_ID=Transactions_tbl.Customer_ID)
0
 
sharringtoncpaAuthor Commented:
Thanks capricorn1.  Your solution will save me a lot of time.  Thanks again.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now