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, 08: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, 12:00 PM
don94403's Avatar
don94403 don94403 is offline
Contributing User
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Jan 2007
Location: Northern California
Posts: 3,058 don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level)don94403 User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 14 h 36 m 55 sec
Reputation Power: 664
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 12:04 PM.

Reply With Quote
  #3  
Old November 6th, 2009, 12:21 PM
June7 June7 is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2009
Location: The Great Land
Posts: 1,118 June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level)June7 User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 35 m 17 sec
Reputation Power: 240
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 01:20 PM.

Reply With Quote
  #4  
Old November 6th, 2009, 12: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!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

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





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