Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

Join Tables with Max Date

Hi Guys,

I have two tables:

Tables1:

Reference,

Name,

Option

Table2:

Reference,

Date,

Note,

The relationship is one to many like each reference might have several notes..

I am trying to join table two to table one to have the latest Note based on the date.

Please let me know your thoughts..

Best,

Alec

1 Solution

Accepted Solutions
alec1982
Specialist II
Specialist II
Author

I have figured a way to get this done.

I have created a temp table to store Reference and max Date.

Then I created a new table to left join the previous table with the rest of the data.

Thxs for all your help

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Look at function FirstSortedValue, I believe that's what you need to get the latest note.

alec1982
Specialist II
Specialist II
Author

I have figured a way to get this done.

I have created a temp table to store Reference and max Date.

Then I created a new table to left join the previous table with the rest of the data.

Thxs for all your help