|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Queries - Multiple Tables
Ok, im back
this time im dealing with multiple table that have the same fields in them but i want to be able to compile them into the same query so that the query will display the results from all of the tables, is this possible? or can i have that one table contains them all, i would do it in one table to begin with but each has to be able to be updated independently of the rest but a main table to display all results if need be has to be possible, and the main table also must be updated as the individual tables are. Any help would be very greatly appreciated. |
|
#2
|
||||
|
||||
|
I really don't understand your question, but let me state some absolutely fundamental principles of relational databases.
If you have more than one table with identical fields, your database is almost certainly organized incorrectly and you will continue to have problems until you re-structure it. A relational database is a model of some segment of the real world. Each table represents an "entity"--people, places, objects, transactions, events, etc. You should not have more than one table per entity. The entire theory of queries is based on that being true. No other arguments about why you think you need more than one table to represent the same entity make any difference whatsoever. So if you have several tables with identical field structures, it implies that your entity is split among those tables, and that's simply flat-out wrong. The only solution is to merge the data into one table. Period. I'm sure that somebody will point out that you can use a Union query to combine results from several tables, but that's dodging the important issue. The structure is simply incorrect. Union queries can be used to temporarily merge tables that have some common fields or that are from different databases, but if your database is structured incorrectly, they won't really solve your basic problem.
__________________
Experience is the thing you have left when everything else is gone. Last edited by don94403 : November 6th, 2009 at 01:04 PM. |
|
#3
|
|||
|
|||
|
don94403 is on the mark. Why update individual tables, just update directly into one, if the fields really are all the same. You might need a new field for the attribute that made you set up segregated tables to begin with. You can always use Select queries to retrieve records based on this attribute. Select queries much easier than Union queries. There is no wizard or builder for Union queries, have to type in the SQL window, keystroke by keystroke.
Last edited by June7 : November 10th, 2009 at 02:20 PM. |
|
#4
|
|||
|
|||
|
ah thank you for the replies i finally realized what a bad move i was making, when i just found a MUCH easier way to do it. This is a very confusing program especially for a newbie like me so i appreciate all the help and advice
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Queries - Multiple Tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|