Brudderman Posted August 2, 2005 Posted August 2, 2005 I have an election database (FMD7), and the VoteData table has these fields: ElectionYear, County, VotingLocation, Contest, Candidate and Votes. Right now the table is populated with data from both 2002 and 2004. I need to make these two finds: 1. VotingLocations which existed in 2004 but not 2002 2. VotingLocations which existed in both years but reported no votes in 2002. So each record in the table is for one year, one location, one contest, one candidate, etc. Thus for a given location, there are separate records for the two years. I'd appreciate suggestions on how to approach both of these finds. Thanks! James McAlister www.BulletinInserts.org www.james-mc.com
SlimJim Posted August 2, 2005 Posted August 2, 2005 An interesting question! The only method I can think of is: 1. Make a second copy of your VoteData table and relate them by location. Now define a value list as Values of field Year show only related values relative to the location relation. For each record this list will contain one or both of 2002, 2004. Finally define a field as ValueListItems(Yearlist) with the carriage returns substituted by ",". So for your find you find all records with an exact match to 2004. 2. Using the above field find all records with a match to 2002,2004 and a year match to 2002 and votes cast = 0.
Brudderman Posted August 5, 2005 Author Posted August 5, 2005 Thanks for the idea! Here's how I was actually able to do it without a value list: I created a new TO (VoteData2) linking VoteData::VotingLocation to itself. The searches would then be 1. this would require 2 requests: a. VoteData::ElectionYear = 2004 b. VoteData2::ElectionYear = 2002 (Omit) 2. a single request: - VoteData::ElectionYear = 2002 - VoteData::Votes = 0 - VoteData2::ElectionYear = 2004 So I think I'm OK now. jm
Recommended Posts
This topic is 7050 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now