eu127
eu127

Reputation: 123

How to filter a database table

I have a table in access like this:

enter image description here

Now what I want is to eliminate the the subcase_id that are closed (with all of their status, not just the row with status closed). How can I do that in Access?

Upvotes: 0

Views: 93

Answers (1)

Sezin Karli
Sezin Karli

Reputation: 2525

SELECT DISTINCT SUBCASE_ID FROM YOUR_TABLE 
WHERE SUBCASE_ID NOT IN (SELECT SUBCASE_ID FROM YOUR_TABLE where ACTIVITY='Closed')

will work I think. I filter closed subcases first and then take non-filtered ones.

Upvotes: 2

Related Questions