Conditional test to combine multiple records

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello everyone,

I have a database where I collect shipment data from various tables.
However, I have a problem. Whenever I want to see shipping data for
orders that were set to ship on or before a certain date (in this case
January 30th) the database will return 2 rows for an order as you can
see below.


Order ID: Line: Due Date: Qty: Ship Qty: Part #: Shipped:
141285 1 1/30/2006 31 10 S15F-55 1/17/2006
141285 1 1/30/2006 31 21 S15F-55 1/27/2006

This is actually one order, that was shipped over the course of
multiple dates. However, I want Access to combine this information into
one record becaue I count the total number of shipped orders in another
query for use in a shippin report. This causes my report to have
incorrect data because it shows 2 orders instead of 1 that just shipped
over the course of multiple dates.

How can I combine these records if the following is true:
If Order ID, Line, Due Date, Qty, and Part # are all the same -
I want Access to combine these records into one line displaying the
greatest shipdate (in this case 1/27/2006).

So in the end, I want my result to look like this:

Order ID: Line: Due Date: Qty: Ship Qty: Part #: Shipped:
141285 1 1/30/2006 31 31 S15F-55 1/27/2006

.



Relevant Pages

  • Conditional test to combine multiple records
    ... I have a database where I collect shipment data from various tables. ... Whenever I want to see shipping data for ... query for use in a shippin report. ... over the course of multiple dates. ...
    (comp.databases.ms-access)
  • Re: Restated: "Fields are expensive, records are cheap"
    ... The mantra in the subject line is purely a rule-of-thumb for beginning database designers. ... You're saying that there is a delay to move the disk heads to different physical locations to retrieve records, and that delay represents degraded performance. ... split a large normalize row in a single table into multiple rows in multiple ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Number of users
    ... While there might be a valid reason to open ... Access multiple times, and mind you, I can't think of one, it is not ... having multiple instances of the same database open. ... "Be who you are and say what you feel, because those who mind don't matter ...
    (microsoft.public.access.modulesdaovba)
  • Re: Question about remote objects
    ... database service with connection to database ... client manager to service logins from client workstations ... the server. ... a row read in from the database, and with multiple users running multiple ...
    (comp.lang.python)
  • Re: Multiple databases - best performance scenario
    ... My company has the need to manage data for multiple customers. ... Multiple small physical servers connected to SAN ... When I'm using the word database ... You might consider checking licensing costs at the oracle store ...
    (comp.databases.oracle.server)