G
Guest
I have 480 tables that have to be combined into one. Each table has a
different date. I have perfected a Union Query which grabs one table and
puts the name of the table (10/1/04) in the Source field -
SELECT [ID #],[CENSUS],[ADM],[DISCH],"10/1/04" As Source
FROM [10/1/04] UNION ALL
That is all fine. The drag is that I would have to write a very long
statement to have the above statement then go grab data from the table
10/2/04 and name the source field, grab data from the table 10/3/04 and name
the source field, etc.
Can someone take me to the next level and give me a sql statment that would
go to many many linked tables and make them UNION ALL and get their
individual Source names?
Bless your little pea pickin hearts.
different date. I have perfected a Union Query which grabs one table and
puts the name of the table (10/1/04) in the Source field -
SELECT [ID #],[CENSUS],[ADM],[DISCH],"10/1/04" As Source
FROM [10/1/04] UNION ALL
That is all fine. The drag is that I would have to write a very long
statement to have the above statement then go grab data from the table
10/2/04 and name the source field, grab data from the table 10/3/04 and name
the source field, etc.
Can someone take me to the next level and give me a sql statment that would
go to many many linked tables and make them UNION ALL and get their
individual Source names?
Bless your little pea pickin hearts.