Avatar of Michael Noze
Michael Noze
 asked on

Find latest date if value is found in a column

Hi Experts,

I'm looking for a query to return the latest date in column ("Last Inspection") from tbldata for every equipments in tblEquipment found in the column ("PairEquipemnt").

IE:
Equipment      Latest Inspection
413                      2019-06-15
420                      2019-12-12
440                      2019-12-12
Database7.laccdb
Microsoft AccessVBASQL

Avatar of undefined
Last Comment
Mark Edwards

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dustin Saunders

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Michael Noze

ASKER
Hi Dustin,

Is there an easy way to split the pair of equipment column as in your picture to make the table1?
Michael Noze

ASKER
A little update..I made a query to separate the two numbers and another query to put everything in a single column.
I also tried to write a function to have the desired output, but it seems to always be blank.
Is there a solution to this?
Database8.accdb
Scott Pletcher

[Oops, Access not SQL Server, nvm.]
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Kent Olsen

Hi Michael,

Based on the column definitions in your access database, the suggestions by Dustin should work well.

Kent
SOLUTION
Mark Edwards

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.