Xeny is not fond of Access.
June 14, 2006 2:37 PM
Subscribe
Dealing with no-records cases in Access
Some nice people in a public-interest group were kind enough to send me their data on the outside interests and committee assignments of state legislators, which is right up my alley. It is an Access database because that's how they did it.
Getting it to list everyone with an outside interest in banking, this is easy.
Getting it to list everyone assigned to a banking committee, this is easy.
What I'm having trouble with is generating the output that I want, which is a row for every legislator, whether or not they have an outside interest in banking, and whether or not they sit on the banking committee.
I can get pretty close to this, but I'm having problems with legislators who have no committee assignments (and so don't appear in that table) or claim to have no outside interests (and so don't appear in that table). These people are not showing up in the final result. This is bad.
So what's the easiest way to get Access to show me *every* legislator?
I have a suspicion that the easiest workaround is to add ~8500 records to the committee-assignment and outside-interest tables asserting that everyone is assigned to the NO_COMMITTEE committee, and everyone has an outside interest in NO_INTEREST, thus making sure that every legislator appears in both of these tables.
But if there's another way to beat Access into submission, I'd likely prefer to do that.
posted by ROU_Xenophobe to computers & internet (6 comments total)
In Access-speak, what you want to do is click on the join - the line - between the two tables and change the join type.
In SQL editor mode, the SQL command should read "A LEFT JOIN B" or "A LEFT OUTER JOIN B" rather than "A INNER JOIN B".
Inner join means only the records from A that have corresponding records in B. That's what you've got now.
posted by jellicle at 2:42 PM on June 14, 2006