473,480 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Running same query acrosss multiple tables

I've got a database with about 300,000 records. There are several
different tables that are set up the same way with identical fields. I
have the same queries individually set up for each table. Is there a
way to just set the query once and then run it across several tables or
tell the query which table to run it on. Some of the queries are just
select queries, some are append, and some are update. Thanks.

Apr 21 '06 #1
1 3386
well, if you run the queries as SQL strings in VBA (instead of query objects
in the database window), you can easily loop through a collection of the
table names, using each one in a given SQL string, in turn. i have to ask,
though: why do you have multiple identical tables? that suggests that you
are using table names to store data (a month? a "type" of something?) in
separate groups. suggest you consider normalizing your data by putting it
all in one table, with a field to designate which "group" each record
belongs to. if you're not familiar with normalization principles, i strongly
recommend you read up on the subject before proceeding further. see
http://home.att.net/~california.db/tips.html#aTip1 for more information.

hth
<fo*******@martecgroup.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
I've got a database with about 300,000 records. There are several
different tables that are set up the same way with identical fields. I
have the same queries individually set up for each table. Is there a
way to just set the query once and then run it across several tables or
tell the query which table to run it on. Some of the queries are just
select queries, some are append, and some are update. Thanks.

Apr 21 '06 #2

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

Similar topics

0
1345
by: Javier Fernandez | last post by:
We just migrate out p690 from kernel 32 bits to kernel 64 bits in order to migrate DB2 v7 to DB2 v8 FP3. The only problem without a solution we find out is since we did the change we cannot run...
2
15024
by: Scott Cannon | last post by:
I am trying to query 3 tables all related by Clinet_ID. The Clients table, Monthly_Expenses table and Monthly_Income table. Each client can have 0>M instances of expenses, past due expenses, and...
2
1353
by: Josh Felker | last post by:
Hey everyone. I have a daily log form with my investing info. In that form I have 2 subforms, the first shows my profits on all the stocks I traded that day, the second shows my profits on...
1
1995
by: hmiller | last post by:
I'm sorry to populate the server with yet another question about linking multiple tables and queries, howerver I have not been able to find the right criteria. My problem. I am trying to...
5
3050
by: mimo | last post by:
Hello, I have seen samples on how to pull data from one table and save back to it using the Form View control. How do I pull from multiple tables and save back to multiple tables on one...
6
2472
by: falbrech_www | last post by:
Hi all, we got here one database which has several linked tables, whereas the link points to several csv-files. Currently we also have 2 different queries using the linked tables. Now one of us...
0
1585
by: Christoph Haas | last post by:
Hi, list... I have written an application in Perl some time ago (I was young and needed the money) that parses multiple large text files containing nested data structures and allows the user to...
3
30267
by: mkjets | last post by:
I have worked for hours on trying to find a solution and have not figured it out. I am working in Access 2003. I need to create a query that takes values from 1 table and displays them in...
7
7497
by: Lewe22 | last post by:
I have a query pulling information from multiple tables, one of which contains a list of students with an auto number their assessment information and how long the assessment took in minutes . ...
0
7034
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,...
1
6732
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...
1
4768
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
4472
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
2990
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
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1294
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 ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
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...

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.