Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 6th, 2009, 09:49 AM
Moody-2000 Moody-2000 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 10 Moody-2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 56 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old November 6th, 2009, 01:00 PM
don94403's Avatar
don94403 don94403 is offline
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,885 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 1 Day 1 h 15 m 11 sec
Reputation Power: 562
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.

Reply With Quote
  #3  
Old November 6th, 2009, 01:21 PM
June7 June7 is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2009
Location: The Great Land
Posts: 535 June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level)June7 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 13 h 47 m 11 sec
Reputation Power: 124
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.

Reply With Quote
  #4  
Old November 6th, 2009, 01:27 PM
Moody-2000 Moody-2000 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 10 Moody-2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 56 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Queries - Multiple Tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek