Results 1 to 2 of 2
  1. #1
    TOPSie is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    114

    Query Help Please

    I have a table defining the delivery route of vehicles to customers. But some entries have been corrupted.
    Here is a simplified version of the table

    Customer Product DropOrder
    CusA Prod1 1
    CusA Prod2 1
    CusB Prod1 2
    CusB Prod3 2
    CusB Prod5 4
    CusC Prod1 3
    CusC Prod6 3

    Prod5 for CusB has got a Drop order of 4 but CusB's other products have got a DropOrder of 2 - which could end up with extra mileage / delay etc

    I am trying to construct a query to spot those customers who have different DropOrders for their set of products (and failing)

    Can anyone suggest a suitable bit of SQL?



    many thanks

    Geoff

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,007
    Group by Cust and DropOrder.

    That will show you the differences. Could also add a count of Prod to see which way you should alter the data.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums