query help (1 Viewer)

userZ

Registered User.
Local time
Today, 13:45
Joined
Oct 14, 2014
Messages
12
From tableA, need a query to get to something like TableB.
TableA:
ID, ProdID, BatchID,ProdType,inpdate, inptime, CarrierID, CarrierName, delivered, comments, fieldn,fieldn+1,location
TableB:
ID, prodID, BatchID, MAx(inpdate+inptime), CarrierName, delivered, location
where delivered is "yes" and location is "loc1"
In Access, i tried multiple queries to get it done. I like one query that does it. It may use less resources.
 

jdraw

Super Moderator
Staff member
Local time
Today, 07:45
Joined
Jan 23, 2006
Messages
15,379
Readers really need to know what you are trying to accomplish. you are telling us HOW you are doing something. We need to understand what that something is.

TableA and tableB don't give many hints as to the purpose of the tables and database.
 

userZ

Registered User.
Local time
Today, 13:45
Joined
Oct 14, 2014
Messages
12
TableA stores product shipment information. inpdate, inptime are the entered date and time for each product.

Need to query the last , MAX(date+time), entry for each product where the "delivered" is yes and location is "loc1". The fields to query are shown in TableB.
 

accedeholdings

Registered User.
Local time
Today, 04:45
Joined
Sep 29, 2014
Messages
15
Readers really need to know what you are trying to accomplish. you are telling us HOW you are doing something. We need to understand what that something is.

TableA and tableB don't give many hints as to the purpose of the tables and database.


So in this case, what will be the best solution?
 

Users who are viewing this thread

Top Bottom