I have a query with a subquery that works perfectly, but I need to filter it even more. this is my actual query:
SELECT Location.Location, Location.LocationId
FROM Location
WHERE Location.LocationId NOT IN
(SELECT Products.LocationId
FROM Products)
ORDER BY Location.Location;
I'd like to add another subquery but they don't seem to work. Probably this is not possible?
My other subquery would be:
(SELECT Products.LocationId, Products.[uit]
FROM Products
WHERE (((Products.[uit])=True)))
I intend to show only the 'locations' that have products.uit marked (those are products that are gone and freed their location) or that have no products at all ==> All free locations.
Any ideas? I've been working on it some time, but I still can't get it. any help would be highly appreaciated.
SELECT Location.Location, Location.LocationId
FROM Location
WHERE Location.LocationId NOT IN
(SELECT Products.LocationId
FROM Products)
ORDER BY Location.Location;
I'd like to add another subquery but they don't seem to work. Probably this is not possible?
My other subquery would be:
(SELECT Products.LocationId, Products.[uit]
FROM Products
WHERE (((Products.[uit])=True)))
I intend to show only the 'locations' that have products.uit marked (those are products that are gone and freed their location) or that have no products at all ==> All free locations.
Any ideas? I've been working on it some time, but I still can't get it. any help would be highly appreaciated.