G
Guest
Hello All,
I'm facing a bizarre problem and I was hoping someone could help me. I'm a
beginning Access user using Access 2003 on an XP machine. I've got a huge
database on my hands which I have split into multiple smaller databases
(though I suppose that's not relevant at the moment).
Here's my intriguing problem. The database I'm working with has only one
table, and that table has only 9 columns: a Key ID column, then three ID
numbers (an Account, Electric, and Gas) and then Name, Address, City, State,
and Zip.
My problem is that the database is constructed in a screwy way. All of the
rows, each of which represents a house, have the Name Address City State and
Zip. But each row DOES NOT contain all the ID information in it (Acct ID,
Electric, & Gas). Instead, each row has the Acct ID, but each row is doubled
(so the table has twice as many records in it as there are houses*). One row
has the Acct ID, the ElectricID, a blank GasID field, and then the name and
address info; the second row has the Acct ID, a blank Electric field, the
GasID, and identical name and address info.
I want to integrate them, so that each house only appears once. Now that
would be hard enough as it is, but here's another wrinkle: a few of the
houses don't have natural gas accts, and so have no GasID, and therefore only
appear once. That means that the total number of rows in the table is NOT
exactly twice the number of houses, as I stated before for simplicity's sake.
For the life of me, I can't figure out how to seperate out and recombine all
the information so that it's in the right format...something to do with
queries, maybe querying out some and exporting them to manipulate them in
Excel, or creating csvs and reimporting the information in some way....I'm
sure it could be done with a custom macro, but I don't know Visual Basic
Let me know if you have ideas, and THANK YOU for reading!
Alex,
nonprofiteer in san francisco
I'm facing a bizarre problem and I was hoping someone could help me. I'm a
beginning Access user using Access 2003 on an XP machine. I've got a huge
database on my hands which I have split into multiple smaller databases
(though I suppose that's not relevant at the moment).
Here's my intriguing problem. The database I'm working with has only one
table, and that table has only 9 columns: a Key ID column, then three ID
numbers (an Account, Electric, and Gas) and then Name, Address, City, State,
and Zip.
My problem is that the database is constructed in a screwy way. All of the
rows, each of which represents a house, have the Name Address City State and
Zip. But each row DOES NOT contain all the ID information in it (Acct ID,
Electric, & Gas). Instead, each row has the Acct ID, but each row is doubled
(so the table has twice as many records in it as there are houses*). One row
has the Acct ID, the ElectricID, a blank GasID field, and then the name and
address info; the second row has the Acct ID, a blank Electric field, the
GasID, and identical name and address info.
I want to integrate them, so that each house only appears once. Now that
would be hard enough as it is, but here's another wrinkle: a few of the
houses don't have natural gas accts, and so have no GasID, and therefore only
appear once. That means that the total number of rows in the table is NOT
exactly twice the number of houses, as I stated before for simplicity's sake.
For the life of me, I can't figure out how to seperate out and recombine all
the information so that it's in the right format...something to do with
queries, maybe querying out some and exporting them to manipulate them in
Excel, or creating csvs and reimporting the information in some way....I'm
sure it could be done with a custom macro, but I don't know Visual Basic
Let me know if you have ideas, and THANK YOU for reading!
Alex,
nonprofiteer in san francisco