473,508 Members | 2,477 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 3080
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...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 #2
"Haas C" <ha*****@yahoo.comwrote in message
news:05**********************************@n1g2000p rb.googlegroups.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 "tblMyOtherTable" 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
1644
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...
2
7339
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...
0
1565
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...
8
8338
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...
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...
3
2217
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...
2
2588
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 ...
2
4115
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...
3
2821
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...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7133
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...
1
7066
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...
0
7504
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...
1
5059
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...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
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...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
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 ...

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.