MCTampa
Board Regular
- Joined
- Apr 14, 2016
- Messages
- 97
I have the following query, which you all helped me write a few years ago.
The query joins two tables and let me me know what units satisfy the parameters.
I want to modify the query to provide me with the units which DO NOT satisfy the parameters.
Thanks
The query joins two tables and let me me know what units satisfy the parameters.
I want to modify the query to provide me with the units which DO NOT satisfy the parameters.
Thanks
SQL:
SELECT
mvwvse.RAREA,
mvwvse.Developer,
mvwvse.Resort,
mvwvse.[Start Date],
mvwvse.[End Date],
mvwvse.SWeek,
mvwvse.EWeek,
mvwvse.[Start Year],
mvwvse.[End Year],
ic.Size, ic.TRKFLD,
ic.SpaceType,
ic.QRR,
ic.TDI,
Sum(ic.[Units]) AS Units
FROM MVWVSE AS mvwvse LEFT JOIN Inventory AS ic ON (mvwvse.Resort = ic.RESX) AND (ic.EXDTFDTF >= mvwvse.[Start Date]) AND (ic.EXDTFDTF <= mvwvse.[End Date])
WHERE (((ic.[Units]) Is Not Null))
GROUP BY mvwvse.RAREA, mvwvse.Developer, mvwvse.Resort, ic.Size, ic.TRKFLD, ic.QRR, ic.TDI, ic.SpaceType, mvwvse.[Start Date], mvwvse.[End Date], mvwvse.SWeek, mvwvse.Eweek, mvwvse.[Start Year], mvwvse.[End Year];