Hi - I need help figuring out how to query data so that it only shows me results that meet very specific criteria. I may be in over my head here, but I will explain as best I can.
I have a table which has BOX_NUM, JACKET_ID and CLOSED_DATES. BOX_NUM and JACKET_ID are unique. The BOX_NUM represents a physical box and the JACKET_ID represents a physical record in that box. CLOSED_DATE represents the date that a physical records were closed. There can be 1 or more JACKET_ID in a BOX_NUM and each can have identical or unique closed dates.
I need to run a query that shows me only BOX_NUMs that contain only JACKET_IDs that have a CLOSED_DATE > 10 years. If a BOX_NUM has at least 1 JACKET_ID that has a CLOSED_DATE < 10 years or is null, then it does not qualify. I can easily run a query to show me only JACKET_IDs with a a close date > 10 years, but it does not tell me which BOX_NUMs contain only JACKET_IDs with a CLOSED_DATE > 10 years. Instead, it only shows JACKET_IDs in a BOX_NUM that have been closed for greater than 10 years.
I am admittedly a complete rank amateur and I am sorry if I have not explained this very well. Please let me know if I need to explain better.
Thanks.