Max Query not working (1 Viewer)

Number11

Member
Local time
Today, 09:43
Joined
Jan 29, 2020
Messages
607
So i have created a query and Max on the Record ID - this query stand alone works fine.

I have another query that i then bring in the above query but its not giving me the latest record

Query1:

ID
CustomerID
Install Date
EngineerNo

Query2:

Customer ID
CustomerOrderNo
CustomerInstallDate
then add the above query but its not showing last?
 

June7

AWF VIP
Local time
Today, 00:43
Joined
Mar 9, 2014
Messages
5,470
Show the SQL statements of each query.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:43
Joined
Feb 19, 2002
Messages
43,263
I can't tell if the data is in one table or two tables. Assuming it is two tables and assuming query 1 is:
Select CustomerID, Max(InstallDate) as MaxInstall, EngineerNo
From your table
Group by CustomerID, EngineerNo;

you may need a left join if all the rows of query1 are not in query2
you may get "duplicates" if query1 has more than one EngineerNo for each CustomerID

But what does "not showing" mean?
 

Users who are viewing this thread

Top Bottom