473,805 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Appending Tables:

I have an Access DB that contains 5 tables for the last 5 years. All 5
tables have the same structure. I wanted to keep each year separate
for organizational purposes.

But, I want to query all 5 tables with one query for an application.

What would an query look like that uses all 5 tables as a source ?

Should I create a view that inserts all 5 tables into a recordset ?
(Wouldn't this be resource heavy ?)

Thanks

Sid.
Nov 13 '05 #1
1 1813
"Eli Sidwell" <si******@alexi an.net> wrote in message
news:ef******** *************** ***@posting.goo gle.com...
I have an Access DB that contains 5 tables for the last 5 years. All 5
tables have the same structure. I wanted to keep each year separate
for organizational purposes.

But, I want to query all 5 tables with one query for an application.

What would an query look like that uses all 5 tables as a source ?

Should I create a view that inserts all 5 tables into a recordset ?
(Wouldn't this be resource heavy ?)


What you're looking for is called a Union query (check help file). It basically
combines tables vertically rather than the more typical horizontal. This type
of query cannot be built in the query design grid, but rather has to built in
SQL view.

You would be better served long term to combine all the tables into one and add
a field to identify the year. It is MUCH easier to pull one desired year out of
a table with multiple year's data using a query than it is to combine multiple
tables with a Union. Plus a Union is automatically read only. Not a problem
for reporting, but you might want to do some editing across years at some point.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11214
by: freeagent | last post by:
Help!! I am a complete Access newbie and I have to concatenate about 30 tables into one large table. All these tables have the same column headings as each other. For example, I have TABLE 1 which contains COLUMN1, COLUMN2, COLUMN3 ....
2
2104
by: dixie | last post by:
If I have two compatible tables, but in two separate databases, can I append the records in one table onto the records in the other by code in either a module or a form. If the two databases were DbA and DbB and the tables were called MyTableA and MyTableB, what would be the best way of achieving this? I would want to append MyTableA onto the bottom of MyTableB and the code to do it would need to be in DbB. Any suggestions? dixie
7
2436
by: PC Datasheet | last post by:
Looking for suggestions ---- A database was designed for a national automobile inspection program. In it's simplest form, the database has two tables: TblOwner OwnerID <Year/Make/Model owned by owner, Owner name/address, etc) TblInspection InspectionID
2
2245
by: tony.collings | last post by:
I started a thread here : http://groups.google.co.uk/group/microsoft.public.cmserver.general/browse_thread/thread/29d63077144004a9/c3888efdcb7338f6?hl=en#c3888efdcb7338f6 About creating an Email function to email authors when the Review Date has expired on their page. I've managed to now achieve a significant proportion of the work by writing out the details to an XML file and reading them back. However I'm a little stuck on Amending...
13
2408
by: Shwetabh | last post by:
Hi, I wanted to know if it is possible to do to append two tables into a third table. For example, consider these two tables Table 1 -------------------------------------------------------------- | Part_num | Prt_name | Desc1 | Desc2 | -------------------------------------------------------------- | PRT1 | PartA | abc | xyz |
2
1397
by: sjlung | last post by:
I have set up queries in access that make tables and then append them to each other. Unfortunately the resulting table after three seperate tables are appended does not comprise of all the entries in each table. Can any one tell me why this is. Thanks alot. Also, since I am appending three seperate queries, the user is asked for the word they are looking for three times and I was wondering whether it would be possible to just set the...
7
9510
by: Daz | last post by:
Hi everyone! Is it possible to take a line of text like so: <tr><td>title1</td><td>title2</td><td>title3</td><td>title4</td></tr> And append it to a DOM node such as this: var nodeToAppendTo = document.getElementById('tbody');
3
1683
by: HSXWillH | last post by:
I've looked through the site and not found what I'm looking for here. I am not code-versed or anything like that so my skills are rudimentary at best. I'm using Access 03 on a Windows Vista environment. My question is about how to minimize data fields from large data-dumps in order to give myself the most recent recordset and to eliminate all older, out of date records. I have 7 bulk tables of data imported daily from a horse-racing text...
3
4470
by: manojspromantr | last post by:
I'm trying to append some data from one table to another table both the table structure are same. I have an attachments field in both tables but it seems that i cannot append the attachments from one table to the other. I get the following error when trying to just append the attachments field to the appropriate field: "An INSERT INTO query cannot contain a multi-valued field" I also get the following error when trying to append the...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10613
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10107
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3846
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.