If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Join Tables with same data
I have 3 tables from 3 different databases they are exactly the same in
structure. They do however each have their own data, is it possible to join those 3 tables up? I have given them each their own name for data integrity but I have to create a duplicate query for each location (tedious) if I am able to join the tables, I would also have to create an append query to update weekly. Any help would be greatly appreciated. |
#2
|
|||
|
|||
Join Tables with same data
Maybe an Union query is what you want. It will output all the data as if it
was one table. NOTE The union query can not be edited/revised in design view. Create a select table form one of the tables and then view it in SQL view. It would look like this -- SELECT Union1.XX, Union1.YY FROM Union1; Then edit to add the other tables like -- SELECT Union1.XX, Union1.YY FROM Union1 UNION SELECT [Union-X].[XX], [Union-X].[ZZ] FROM [Union-X] UNION SELECT Union2.XX, Union2.YY FROM Union2; "phuser" wrote: I have 3 tables from 3 different databases they are exactly the same in structure. They do however each have their own data, is it possible to join those 3 tables up? I have given them each their own name for data integrity but I have to create a duplicate query for each location (tedious) if I am able to join the tables, I would also have to create an append query to update weekly. Any help would be greatly appreciated. |
#3
|
|||
|
|||
Join Tables with same data
In addition to what Karl said, since the tables are in different databases,
you'll have to prefix the table name's in each select statement with the database path. Example being (assuming your three databases are in the c:\Databases folder under the names of sample1, sample2, sample3: SELECT field1, field2 from [C:\Databases\sample1.mdb].Table1 UNION SELECT field1, field2 from [c:\Databasees\sample2.mdb].Table1 UNION SELECT field1, field2 from [c:\Databasees\sample3.mdb].Table1; "phuser" wrote: I have 3 tables from 3 different databases they are exactly the same in structure. They do however each have their own data, is it possible to join those 3 tables up? I have given them each their own name for data integrity but I have to create a duplicate query for each location (tedious) if I am able to join the tables, I would also have to create an append query to update weekly. Any help would be greatly appreciated. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Phone call log, multiple fields for different times | Philip | Database Design | 18 | May 16th, 2006 01:27 AM |
Three tables issue still remains | Engineer1978 | New Users | 2 | May 3rd, 2006 09:02 PM |
Can't join 2 tables - data stored as row in 1 table, column in ano | bambam | Database Design | 1 | March 13th, 2006 01:56 AM |
Entering data in new tables & want to 'see' related data | tjr | Database Design | 4 | November 21st, 2005 12:49 AM |
Format on data to import to Access tables? (I need your advice) | Niklas Östergren | General Discussion | 5 | December 13th, 2004 02:54 PM |