FROM wo_master_IM3_Elig AS W1
WHERE modify_timestamp =
(SELECT MAX(modify_timestamp) FROM wo_master_IM3_elig_Enc AS W2
WHERE W2.person_id = W1.person_id);
John Viescas, Author
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
On Jun 28, 2016, at 8:26 PM, firstname.lastname@example.org [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I have a query which will not export to excel. I have been able to export the one that was created that pulled in all the patients but this one that limits the patients to the last encounter will not export. IDEAS?
FROM wo_master_IM3_elig_Enc INNER JOIN (SELECT person_id, MAX(modify_timestamp) AS TimeMatch FROM wo_master_IM3_elig_Enc GROUP BY person_id) AS MaxRecord ON (wo_master_IM3_elig_Enc.modify_timestamp = MaxRecord.TimeMatch) AND (wo_master_IM3_elig_Enc.person_id = MaxRecord.person_id);
Posted by: John Viescas <email@example.com>
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (2)|
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.