A Digital Age Deserves A Digital Leader

SQL - Joining two SELECT statements

SQL - Joining two SELECT statements

Postby Andrew... » Mon Sep 07, 2009 12:11 am

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?
PRO New Member
Posts: 1
Joined: Sun Sep 06, 2009 11:59 pm

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron
cron