How do you show buildings with expired contracts only?

I have a building record with two associated contract records. I want to create a query that only shows me buildings with contracts that have an Expired status, and not return the buildings that have contracts with an Active status.

I was thinking that if we have a query that shows me buildings that have any active contracts associated, and use that query as a NOT IN filter for my base query of buildings. Because if we filter out just a status, the one-to-many ratio still returns buildings that have active contracts along with those retired contracts.

Continue reading


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.