473,666 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Query to run on Numerous Linked Tables

This is probably a 'Low-Level' question to all the ACCESS experts but
I've only been using ACCESS for a couple of weeks.

I've been given 30+ (and counting) separate 'Weekly' Databases which
all have a Table, in exactly the same Field format, in each of these
'Weekly' DataBases.

I want to set-up a new 'Master' Database, so that I can write one
Query to search all the 'Weekly' Databases and produce one new Table
in the 'Master' Database from all the Tables in the 'Weekly'
Databases.

I've Linked (File/Get External Data/Link Tables) all the relevant
Tables from the 'Weekly' Databases to the 'Master' Database but need
help to create a Query for extracting, for example, all London related
items. I've been told it can be done using SQL (which I have no
experience of!!).

Any 'step by step' assistance would be greatly appreciated.

I'm using ACCESS 2000.
Nov 12 '05 #1
3 6993
On 14 Nov 2003 04:25:12 -0800, gr**********@fr eeuk.com (G rumpy O ld
D uffer) wrote:

You could start with a union query:
select * from tblWeek1
union
select * from tblWeek2
....etc...

A much better solution is to develop a single perpetual database for
them, by adding a date field to the data, or perhaps a yyyyww (year
number, week number) field.

-Tom.

This is probably a 'Low-Level' question to all the ACCESS experts but
I've only been using ACCESS for a couple of weeks.

I've been given 30+ (and counting) separate 'Weekly' Databases which
all have a Table, in exactly the same Field format, in each of these
'Weekly' DataBases.

I want to set-up a new 'Master' Database, so that I can write one
Query to search all the 'Weekly' Databases and produce one new Table
in the 'Master' Database from all the Tables in the 'Weekly'
Databases.

I've Linked (File/Get External Data/Link Tables) all the relevant
Tables from the 'Weekly' Databases to the 'Master' Database but need
help to create a Query for extracting, for example, all London related
items. I've been told it can be done using SQL (which I have no
experience of!!).

Any 'step by step' assistance would be greatly appreciated.

I'm using ACCESS 2000.


Nov 12 '05 #2
The problem with this is that each 'Weekly' Database contains circa
800,000 records and 50 fields. Could get very large!!!!
A much better solution is to develop a single perpetual database for
them, by adding a date field to the data, or perhaps a yyyyww (year
number, week number) field.

-Tom.



This is probably a 'Low-Level' question to all the ACCESS experts but
I've only been using ACCESS for a couple of weeks.

I've been given 30+ (and counting) separate 'Weekly' Databases which
all have a Table, in exactly the same Field format, in each of these
'Weekly' DataBases.

I want to set-up a new 'Master' Database, so that I can write one
Query to search all the 'Weekly' Databases and produce one new Table
in the 'Master' Database from all the Tables in the 'Weekly'
Databases.

I've Linked (File/Get External Data/Link Tables) all the relevant
Tables from the 'Weekly' Databases to the 'Master' Database but need
help to create a Query for extracting, for example, all London related
items. I've been told it can be done using SQL (which I have no
experience of!!).

Any 'step by step' assistance would be greatly appreciated.

I'm using ACCESS 2000.

Nov 12 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Zowie . . . 800,000 records per week!!

Well hopefully, the table name is the same in all database files
(.mdb). You'd have to create a loop in VBA that iterates thru each db
file name & programmaticall y alter the SQL statement for each db file.
You don't have to link all the tables in the other dbs to the working
db file - you can use the JET SQL "In" predicate to indicate which db
file you want to read data from. You should put all weekly db files
in one folder; format the db files like this: "yyyyww.mdb " i.e., week
30 of year 2003 would be "200330.mdb " (numbers are best - 'cuz they
can be searched in numerical order, programmaticall y).

SELECT *
FROM tblWeeklyData In "c:\MyDocs\2003 30.mdb"
WHERE City = 'London'

You'd programmaticall y change the name of the db file

(. . . In " <change this file name> " . . .).

You'd have to save the retrieved data in a temp table in the current
db 'cuz you have the possibility of many recordsets returned from the
many db files. After all the db files have been searched, run another
query that accesses the temp table.

Quite a project, but not undo-able.

HTH,

MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP7WXfYechKq OuFEgEQKwIwCfUy +eTzv1dKEpbQooU y3oC5U7fKEAoIAh
Ivr5Al8QDgcvmHY 6n0bh3dzr
=ZmgL
-----END PGP SIGNATURE-----

G rumpy O ld D uffer wrote:
The problem with this is that each 'Weekly' Database contains circa
800,000 records and 50 fields. Could get very large!!!!

A much better solution is to develop a single perpetual database for
them, by adding a date field to the data, or perhaps a yyyyww (year
number, week number) field.

-Tom.



This is probably a 'Low-Level' question to all the ACCESS experts but
I've only been using ACCESS for a couple of weeks.

I've been given 30+ (and counting) separate 'Weekly' Databases which
all have a Table, in exactly the same Field format, in each of these
'Weekly' DataBases.

I want to set-up a new 'Master' Database, so that I can write one
Query to search all the 'Weekly' Databases and produce one new Table
in the 'Master' Database from all the Tables in the 'Weekly'
Databases.

I've Linked (File/Get External Data/Link Tables) all the relevant
Tables from the 'Weekly' Databases to the 'Master' Database but need
help to create a Query for extracting, for example, all London related
items. I've been told it can be done using SQL (which I have no
experience of!!).

Any 'step by step' assistance would be greatly appreciated.

I'm using ACCESS 2000.


Nov 12 '05 #4

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

Similar topics

1
1422
by: Mark Hargreaves | last post by:
Hopefully someone can help me here. I have a personnel database with numerous tables, although only a few are required for this particular query. I will name them as follows: master - holds personal details about an employee,with the "staffno" field as primary key; psnexams - details number and type of exams a person has passed. Linked to the master table using staffno field.
0
8673
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change frequently, so I want to: A) prompt the user, using a custom form, for the specific Excel files to be linked; B) create the links dynamically; C) insert the linked tables into a select query grid and include the SQL statement in the VBA...
4
19807
by: intl04 | last post by:
How do I create a data input form in Access that is external to the Access database to which it's connected (if that's possible, which I believe it is)? For example, if someone clicks on an Access file icon on a computer desktop, it will open up a data entry form (that was created in Access). That way, the people who enter the data won't have direct access to the database at any point. I've seen that this can be done, but I don't know...
3
3047
by: Larry R Harrison Jr | last post by:
I have an Access 97 database with 2 tables, parent one called tblDocuments and child one named tblRevisions. They are linked with DocID in both tables. In the revisions table a given DocID can show up numerous times. Another field named revision will vary in these records. A query I have will show all instances of a given DocID in the revisions table. What I want it to do is show the most recent revision, which would be the one with...
1
2078
by: David | last post by:
I am hopeing someone can help me with this as I have struggled over the last few days with it. I have a make table query which I want to use to split the table up into seperate tables which are linked to a manager. I have a Manager table which I could use to link the query with but I have not been able to sort out the linking. I have been trying to link on the manager and use that field as a parameter with the table i need to split, but to...
4
8119
by: Wayne Wengert | last post by:
I am trying to create a VB.NET Windows application to move some data from a local Access DB table to a table in a SQL Server. The approach I am trying is to open an OLEDB connection to the local Access DB and then add a Linked Table pointing to the table on the SQL Server and then run an "Insert Into (linked table)" query to add the new rows. I am having a problem getting the syntax to add that linked table to my local Access DB. When I...
5
7225
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends, but will be migrating my back ends to Oracle ODBC. 1. Does anyone have recommendations for books or web resources for general rules/guidelines/help on doing this? I haven't found a good
4
1937
by: pokerboy801 | last post by:
OK, I will try to explain this as clearly and as concise as possible. I am using Access, which has three MS Excel Linked tables, to store call center metrics for reps. My Excel workbook has three separate worksheets, all linked to Access. I have a query that performs some minor calculations, not to hard, and will be ued to drive a report. Here is my problem, I only have about 14 rows of data in each table as we only have three reps. ...
6
4398
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one field between them. The join field in both tables are indexed and I'm selecting 1 field from each table to lookup. The Access query is taking more than 60 second to retrieve 1 record and if I execute the same query within the Query Analyzer, it...
0
8356
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
8871
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
8783
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
8552
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
8640
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
7387
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
4198
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...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.