473,804 Members | 3,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combining multiple tables into one

Hi all,

I am a newbie who goes through tasks in apainfully slow and in an
inefficient way in Access. I've been experimenting here and there and
have figured out a few things, but for the most part, I still need
help. Here's a quick question that can help me get rolling with a new
project. I have multiple tables, all have the same field names and
formats...what is the quickest way to merge them all into one large
table? I've been doing an Append Query one by one, but that takes a
while, given that i have 45 tables. The table I want all the other
tables "merged" or appended to is tblAllStocks. Is there a faster way
to do this instead of Appening one table at a time?

Thank you for your help in advance,
-Haas
Oct 20 '08 #1
2 3094
On Mon, 20 Oct 2008 06:33:59 -0700 (PDT), Haas C <ha*****@yahoo. com>
wrote:

There is no faster way, unless you are fluent with VBA, but then you
probably would not have asked the question.
If you have to do this repeatedly, you can create 45 queries, and run
them in sequence from a single macro.

-Tom.
Microsoft Access MVP

>Hi all,

I am a newbie who goes through tasks in apainfully slow and in an
inefficient way in Access. I've been experimenting here and there and
have figured out a few things, but for the most part, I still need
help. Here's a quick question that can help me get rolling with a new
project. I have multiple tables, all have the same field names and
formats...wh at is the quickest way to merge them all into one large
table? I've been doing an Append Query one by one, but that takes a
while, given that i have 45 tables. The table I want all the other
tables "merged" or appended to is tblAllStocks. Is there a faster way
to do this instead of Appening one table at a time?

Thank you for your help in advance,
-Haas
Oct 20 '08 #2
"Haas C" <ha*****@yahoo. comwrote in message
news:05******** *************** ***********@n1g 2000prb.googleg roups.com...
Hi all,

I am a newbie who goes through tasks in apainfully slow and in an
inefficient way in Access. I've been experimenting here and there and
have figured out a few things, but for the most part, I still need
help. Here's a quick question that can help me get rolling with a new
project. I have multiple tables, all have the same field names and
formats...what is the quickest way to merge them all into one large
table? I've been doing an Append Query one by one, but that takes a
while, given that i have 45 tables. The table I want all the other
tables "merged" or appended to is tblAllStocks. Is there a faster way
to do this instead of Appening one table at a time?

Thank you for your help in advance,
-Haas
Well you could try using some code along the lines of

Dim db As DAO.Database, strSQL as String
Set db = CurrentDb

strSQL = Insert into tblAllStocks ( MyField1, MyField2 ...etc ) Select
MyOtherField1, MyOtherField2 ... etc from tblMyOtherTable

db.Execute strSQL, dbFailOnError
Set db = Nothing

substituting field names as appropriate and changing "tblMyOtherTabl e" each
time you run it.

Keith.
www.keithwilby.co.uk

Oct 20 '08 #3

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

Similar topics

0
1667
by: glenn | last post by:
I'm really scratching my head over this one. I'm working with CSV data exported from Excel, which explains why it's a mess to begin with. Within a table (or via any other means someone might be able to recommend) I need to combine multiple records which share two like fields. (If that's not clear, the real-world explanation is below.) +----------+--------------+----+----+----+----+----+ | ID | ADDRESS | P1 | P2 | P3 | P4 |...
2
7355
by: Kenneth Fosse | last post by:
Hi. I'm currently working on a project which involves the creation of a web page which reports selected data to customers from two back-end systems. I use ASP script language on IIS, the server is MS SQL 2000. Now I'm struggling with combining two tables from the different databases. I'm sure it's simple enough, but I'm a little short on the SQL expertise. I've got two databases, db1 and db2, and then two tables, db1.t1 and
0
1579
by: Bob C. | last post by:
I am considering combining one large Access db and several small Access db's into a single SQL Server 2000 db. The small db's serve separate but related functions in our operation, and they all share some tables for read-only lookup purposes. All users(about 24) work in the main db, as well as in the small db's related to their particular jobs. Here are the pros and cons as I see them now. Pros:
8
8363
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though the records are sorted by row numbers. (I had to split the fields to different sheets because Excel has a limit of 256 fields in each sheet) My sheets are quite large (~55,000 rows and 200 columns each) and I'll have to repeat this action many...
22
698
by: Martin C | last post by:
I have inherited a database which has a table for each of our 1200 customers. Each table is exactly the same. It is very difficult to generate reports I would like to create a new table and take in all the records of all the tables into this database. The new table will have an extra field which will hold the table name for the records imported from the tables. Can anyone help?
3
2228
by: Flip | last post by:
I'm looking at the O'Reilly Programming C# book and I have a question about extending and combining interfaces syntax. It just looks a bit odd to me, the two syntaxes look identical, but how does C# know which is extending and which is combining? interface IStorable{ void Read(); void Write(object o); }
2
2595
by: rdraider | last post by:
Using SQL 2000, how can you combine multiple records into 1? The source data is varchar(255), the destination will be text. I need help with the select statement. example tables: CREATE TABLE ( , , (255), ,
2
4137
by: J055 | last post by:
Hi I need to search a number of DataTables within a DataSet (with some relationships) and then display the filtered results in a GridView. The Columns that need to be displayed come from 2 of the tables but the search needs check 3 or 4 tables. Do I need to create a new DataTable which has the columns from both the tables so I can display in the Gridview or can I get the columns somehow from the DataSet without creating a new table? I...
3
2849
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one dataset to data in a second dataset, using a common key. I will first describe the problem in words and then I will show my code, which has most of the solution done already. I have built an ASP.NET that queries an Index Server and returns a...
0
9588
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
10589
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
10340
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
10327
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
10085
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...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2999
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.