I'm having real issues trying to join these two select queries,
Select Name From tblDevice, tblCategory, tblRental where tblDevice.Category_ID = tblCategory.Category_ID and tblRental.Rental_Return_Date Is not Null
SELECT * FROM tblDevice WHERE Device_ID NOT IN (SELECT Device_ID FROM tblRental)
My ideal solution where the first query below is "QUERY1" and the second is "QUERY2"
SELECT * FROM QUERY1, QUERY2 WHERE QUERY1.Device_ID = QUERY2.Device_ID
This ofcourse, isn't correct SQL. Could someone suggest how to do this properly?