Results 1 to 3 of 3
  1. #1
    greatwhite is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2019
    Location
    Ottawa, ON
    Posts
    56

    Left Join not returning all records

    I doubt if you will be able to tell without seeing the data, but I thought I would ask anyways.



    Below is my Query it should return all records in the VDC table of which there are 2647 instead all I get is 2466 and only on records that match. What am I missing in the query I don't see it.


    SELECT tblCable.strCableID, tblCable.strCableType, tblCable.numCableLength, tblCable.keyEquipUp, tblCable.keyEquipDn, VDC.Panel, VDC.Cable, VDC.Cable_Length, VDC.Circuit_name, VDC.UpStreamCable, VDC.FPN, VDC.Load_Type, VDC.Phase, VDC.ID






    FROM VDC Left JOIN tblCable ON VDC.Circuit_name = tblCable.strCableID


    WHERE tblCable.keyShip=8




    order by VDC.ID

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    What do you want to see in plain English --not jargon?
    Here are some examples of joins.
    Click image for larger version. 

Name:	VariousJoinExamples.png 
Views:	12 
Size:	41.5 KB 
ID:	38981

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Note that you have a WHERE clause too.
    Code:
    WHERE tblCable.keyShip=8
    If you take off the WHERE clause, how many records does it return?

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

Similar Threads

  1. Replies: 14
    Last Post: 07-31-2018, 11:00 AM
  2. Replies: 3
    Last Post: 09-20-2017, 09:50 AM
  3. Returning null records from double join
    By Billabong in forum Queries
    Replies: 2
    Last Post: 03-04-2016, 08:31 AM
  4. Replies: 1
    Last Post: 09-20-2011, 03:23 PM
  5. Replies: 3
    Last Post: 02-02-2011, 01:00 PM

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