Results 1 to 3 of 3

Thread: (Solved) Duplicated Records On Query...

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Location
    Tijuana,Mexico
    Posts
    109

    Resolved (Solved) Duplicated Records On Query...

    Hi everybody... I have loooking for some answers to my problem in the forum but I got nothing... so here I am....

    Lets say that Table A has the following fields: Order,Rack, ID, INDate, EndDate.
    And TableB has: Order, Model, Line, CaptDate, Qty.

    Here is my query for a lis of racks used by Line:

    VB Code:
    1. SQL = "SELECT Rack, Sum(1) as TotalRack FROM TableA " _
    2.    & ", TableB WHERE TableA .Orden = TableB.Orden" _
    3.    & " AND TableB.Linea = '" Line "' GROUP BY Rack ORDER BY TotalRack DESC"

    I found that I got repeated records if Orden is repeated in TableB, so the question is how can I get rid of those duplicated records?... I mean that if there is a match and TableA.Orden exist in TableB then it counts (thats OK) but if TableA.Orden exist twice then it counts twice (thats not good)...

    Hope you can help me...
    Last edited by G-Hawk; Sep 9th, 2006 at 05:12 PM. Reason: Change of Title (Resolved)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width