Query is not displaying records after adding multiple tables.

Mezta1988

Registered User.
Local time
Today, 21:41
Joined
Jan 22, 2019
Messages
41
Hi good people,

I'm having an issue in generating Query from a multiple table source. I have a table called "DeviceLists" and within that table, I have two fields named DeviceType and EmpID which are connected to my DeviceType and my Employee Details table. Now the problem is, every time I make a Query and add the "Employee Details" inside it then when I run the query no records are showing, but if I remove the Employee Details table and leave only DeviceType and DeviceLists the records are showing.
 

Attachments

  • Query.png
    Query.png
    56.5 KB · Views: 103
Post the SQL statement. Does it use INNER JOIN?
 
Code:
SELECT DeviceList.ID, DeviceList.DeviceName, DeviceList.Description, [Device Type].DeviceType, DeviceList.DeviceBrand, DeviceList.ModelNo, DeviceList.SerialNo, DeviceList.MacAddres, DeviceList.PurchaseDate, DeviceList.CheckoutDate, DeviceList.Status, DeviceList.Note, [Employee Details].FIrstName
FROM [Employee Details] INNER JOIN ([Device Type] INNER JOIN DeviceList ON [Device Type].ID = DeviceList.DeviceType) ON [Employee Details].EmpID = DeviceList.EmpID;

Here is the SQL Statement.
 
Try LEFT or RIGHT JOIN - I forget which - "Include all records from Device List …"
 
Thank you for the quick response @June7, the problem is solved.
 

Users who are viewing this thread

Back
Top Bottom