Re: Combining tables - UNUSUAL REQUEST

From: Paul Johnson (pe_johnson_at_hotmail.com)
Date: 09/25/04


Date: Fri, 24 Sep 2004 22:33:03 -0400

Sorry if this echoes Gunny's response, but it offers a little more detail,
too. I had it written, about to send it when I took my kids to a birthday
party and ended up staying for the whole thing. I guess you could wait for
replies on a Friday night!

You could use a UNION query, and forget about building another table that
copies values from separate tables. Of course, I wonder why there are
twelve separate tables in the first place. Since you say the tables have
the exact same columns, you can do a very simple "SELECT *" query uniting
the tables.

Simple Union query:

SELECT *
FROM JanuaryTable
UNION
SELECT *
FROM FebruaryTable
UNION
SELECT *
FROM MarchTable
UNION
SELECT *
FROM AprilTable
UNION
SELECT *
FROM MayTable
UNION
SELECT *
FROM JuneTable
UNION
SELECT *
FROM JulyTable
UNION
SELECT *
FROM AugustTable
UNION
SELECT *
FROM SeptemberTable
UNION
SELECT *
FROM OctoberTable
UNION
SELECT *
FROM NovemberTable
UNION
SELECT *
FROM DecemberTable
ORDER BY SomeField;

HTH

 Paul

"Parthenon" <anonymous@discussions.microsoft.com> wrote in message
news:0c9e01c4a271$0139dcf0$a501280a@phx.gbl...
> Hopefully not too unusual, but I am not very familiar with
> Access!
>
> I have many tables, each with one month's worth of data.
> These tables have the exact same column fields, but
> obviously different data underneath.
>
> I'd like to combine these tables with 12 months of data
> into ONE table for the whole year. Basically just append
> my January table with the rest of the months.
>
> The tricky part for me is to not add NEW COLUMNS, just
> more data under the current columns.
>
> Any ideas? Sorry if this is a simple request.
>
> Thanks in advance!



Relevant Pages

  • Re: Combining tables - UNUSUAL REQUEST
    ... UNION ... > twelve separate tables in the first place. ... > the exact same columns, you can do a very simple "SELECT *" query uniting ... > Simple Union query: ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Tables
    ... Not sure what you would gain by having two tables with duplicate structure. ... It certainly sounds like more work to keep the separate tables coordinated ... if you need to simultaneously retrieve records ... > from your active table and your archive table, you can use an union query. ...
    (microsoft.public.access.gettingstarted)
  • Re: Best way to combine two tables in a query
    ... I have two tables that hold membership information about two separate ... About 50 members cross over, ... It sure sounds like you should start with a UNION query to ... You should not have four class fields in ...
    (microsoft.public.access.queries)
  • Re: Select which set of data a form uses
    ... Put the results of the union query in a separate form that the user can open ... I have a Fuel Card inventory. ... Display Record where this is true for that FCNo ...
    (microsoft.public.access.forms)
  • Re: Perform Multi-table Query??
    ... I did build 2 separate queries and the results returned are ... you may be able to do all this in one Union Query rather than ... Check Access Help on Union Queries. ...
    (microsoft.public.access.queries)

Loading