P
Peter
I'm using MS Access 2002. I want to design a query that forces a certain key
table's number of rows to be repeated in each query result, even when some
elements in other tables do not report data for certain items on the key
table.
Background: I'm updating a big benchmarking database that I previously
slogged through Excel to clean up. This time I want to design better queries
in Access before exporting the data to Excel for statistical analysis. The
data involves 2,500 data items per electric utillity per year, with 200+
utility companies on the list, going back every year to 1994. If you
multiply those out you end up with 7.5 million data points...even though I
only end up using 5% of the data, but it will still be several hundred
thousand data items even before I start the number crunching in Excel.
The key table is called Row Literal Table. It defines what the row numbers
in the other tables mean.
Example: The Plant in Service table if fully loaded, per all the items for
it in the Row Literal Table, has 104 lines of data, but one utility may have
no nuclear power plants, so it will have blanks where the nuclear plant data
rows are, and then it will show (say) only 80 lines out of the full 104
possible, in its Plant in Service query results, while another utility that
has no transmission lines will have a different subset out of the 104 lines
of data on the same query result.
When I export my data into Excel I want to line up all the Row Literals in
the same rows in Excel, across for each year from 1994 to the present, but,
the rows don't line up, because of the blank items in some utilities make
their lists shorter.
So I want to do a query so that if a utility does not report something, its
query result should have a line with the row literal (e.g. Nuclear plant in
service) and then blanks on that row, rather than missing that row. This
way, in Excel, I can do statisics much more easily. There's too much data
and too much variability to use vlookups or nested IF statements in Excel to
resolve this.
Thanks in advance.
Peter
table's number of rows to be repeated in each query result, even when some
elements in other tables do not report data for certain items on the key
table.
Background: I'm updating a big benchmarking database that I previously
slogged through Excel to clean up. This time I want to design better queries
in Access before exporting the data to Excel for statistical analysis. The
data involves 2,500 data items per electric utillity per year, with 200+
utility companies on the list, going back every year to 1994. If you
multiply those out you end up with 7.5 million data points...even though I
only end up using 5% of the data, but it will still be several hundred
thousand data items even before I start the number crunching in Excel.
The key table is called Row Literal Table. It defines what the row numbers
in the other tables mean.
Example: The Plant in Service table if fully loaded, per all the items for
it in the Row Literal Table, has 104 lines of data, but one utility may have
no nuclear power plants, so it will have blanks where the nuclear plant data
rows are, and then it will show (say) only 80 lines out of the full 104
possible, in its Plant in Service query results, while another utility that
has no transmission lines will have a different subset out of the 104 lines
of data on the same query result.
When I export my data into Excel I want to line up all the Row Literals in
the same rows in Excel, across for each year from 1994 to the present, but,
the rows don't line up, because of the blank items in some utilities make
their lists shorter.
So I want to do a query so that if a utility does not report something, its
query result should have a line with the row literal (e.g. Nuclear plant in
service) and then blanks on that row, rather than missing that row. This
way, in Excel, I can do statisics much more easily. There's too much data
and too much variability to use vlookups or nested IF statements in Excel to
resolve this.
Thanks in advance.
Peter