Anti-querying?

  • Thread starter Thread starter eggplantq
  • Start date Start date
E

eggplantq

Guest
OK,
I work for a political party. I work with voter history information. Normally, I am doing queries in order to bring up particular voters, and eliminate others.

Example - the basic table I work with contains the names, addresses, affilitations, and voting histories of everyone in my county. I normally query to bring up voters of a particular party, or people who voted in a particular election or number of elections or both. I more or less sort voters out, but in a positive manner, by creating tables with voters who did a particular thing.

For example: out of all the voters, I just want Democrats who voted in two of the past three primaries. I would then get a table that contained just those voters and no others.

Today, though, I was asked to create a table that would exclude voters based on their behavior, exluding voters who did a particular thing but showing everyone else.

Example, I have a request for all of the voters in the county, except those who voted in the 2004 and 2002 primaries. I know how to create a table with those voters and no others, but I don't know how to query for everyone but those voters. Can anyone help?
 
I know how to create a table with those voters and no others

I do hope I misunderstand you in such that you're not creating separate tables per requested query ;)

You basically should have 2 tables, one with voters info, one with votes.
Tables should have a one to many relation.
Now if you register when primaries were held, you can create a rather simple query, excluding the 2002 and 2004:

WHERE Year(primariesdate) NOT IN (2002, 2004)

That's assuming that you store the primaries date.

RV
 
One way would be to create a query that returns those people that did vote in those elections, then use the unmatched query wizard to compare that query to your main table to find those that did not.
 

Users who are viewing this thread

Back
Top Bottom