gradinumcp
IS-IT--Management
Hi! I have 2 tables with the corresponding columns:
1) InventoryComputers-ComputerID, ComputerSN.
2) InventoryStations-Autonum, BranchID, StationID, ComputerID.
I want to display all rows of InventoryComputers for which the ComputerID does not have an entry in InventoryStations.
So basically, I want to display those computers that do not have a station assigned to them.
I tried this sql statement, but it also displays those rows that are present in InventoryStations table, which I don't want.
SELECT * FROM InventoryComputers
LEFT OUTER JOIN InventoryStations on InventoryStations.ComputerID=InventoryComputers.ComputerID
ORDER BY InventoryComputers.ComputerID
Any ideas what is wrong??
1) InventoryComputers-ComputerID, ComputerSN.
2) InventoryStations-Autonum, BranchID, StationID, ComputerID.
I want to display all rows of InventoryComputers for which the ComputerID does not have an entry in InventoryStations.
So basically, I want to display those computers that do not have a station assigned to them.
I tried this sql statement, but it also displays those rows that are present in InventoryStations table, which I don't want.
SELECT * FROM InventoryComputers
LEFT OUTER JOIN InventoryStations on InventoryStations.ComputerID=InventoryComputers.ComputerID
ORDER BY InventoryComputers.ComputerID
Any ideas what is wrong??