0

Use filter to get results not wanted, then get difference.

Hello,

I have found a similar question with an answer, which I tried without success.

Let me first explain what I want to do. We are trying to use Jet to get reports from our door system to see who has come into/left the building.
We have a PC running a SQL database, and I have connected via Jet. There is a table called "EventsEx" which stores all entry/exit events and things of that nature, and a table called "UsersEx" which houses a list of all users we have set up on the system.

Now what I am trying to do, is to get a list of unique "UserID"s in the EventsEx table for a given day. I then want to compare that to the UsersEx table, to determine who has not been in. If there are no entrys in the EventsEx table for a UserID, I know they have not entered the building.

I tried using a filter on the EventsEx table to get the UserID field between two dates, and a filter to get all unique UserIDs from the UsersEx table. I then tried using an NP difference to see which IDs where not in the filter.

The solution I found on another question which didnt work was:
=NL("Rows",NP("Difference",NL("Filter","UsersEx","UserID","DataSource=","Net2"),NL("Filter","EventsEx","UserID","DataSource=","Net2","EventTime","16/10/2013..17/10/2013")),,"DataSource=","Net2")
This just seems to return all IDs from the UsersEx table. I am sure what I want is possible, but I can't quite wrap my head around it :(

Appreciate any help or guidance.

Eds

3 comments

Please sign in to leave a comment.