Home
MS Access SQL JOIN Multiple Conditional
Joins can be complex. So what if you need to joing AND select where...
SELECT *
FROM (customers LEFT JOIN users ON (customers.id = who.custid AND who.live = true))
INNER JOIN locations ON customers.id = location.id
WHERE locations.primary = true
So we can have a JOIN with table1.id = table2.id AND table2.something = true. For Access at least the multiple join constraints need to be in brackets
customers LEFT JOIN users ON (customers.id = who.custid AND who.live = true)
Reader's Comments
Name
Comment
Add a RELEVANT link (not required)
Upload an image (not required)
Uploading...
Home