473,378 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Locate unmatched records from many similiar Access Databases

Hello,

I need some help, I have about 200 databases that are copies of an original database that has a similiar table in all of the databases, called "tblCodebook".

What I am trying to do is to create a macro that will go into each of the 200 databases, run an identical "unmatched query" to find any records that might be in one of the copies of the "tblCodebook". There is a shared primary key in the "tblCodebook" which is a StoryID and EvaluatorID which together is unique.

Here is my query:
SELECT tblcodebook1.StoryID, tblcodebook1.EvaluatorID
FROM extracodebook LEFT JOIN tblCodebook ON (extracodebook.EvaluatorID
= tblCodebook.EvaluatorID) AND (tblcodebook1.StoryID =
tblCodebook_master.StoryID)
WHERE (((tblCodebook_master.StoryID) Is Null) AND
((tblCodebook_master.EvaluatorID) Is Null));

I can get the query to run in one database of course, but I am having problems trying to write a macro that does connections to each of the 200 databases that I have so I can run this query in it.

I think an alternative is to try and get all of the "tblCodebook" tables into one database, then run the query, but I would like to somehow write some macro to do the connections to the databases programatically so I do not have to compile all of these tables I wish to query into one database.

I am fluent in NI LabView, C++, and a little of VB.

Please help! Any help would be greatly appreciated!!!!!!
Jul 23 '07 #1
2 1630
Sorry, here is my correct query, had a mistype...

SELECT tblcodebook1.StoryID, tblcodebook1.EvaluatorID

FROM tblcodebook1 LEFT JOIN tblCodebook_master ON (tblcodebook1.EvaluatorID = tblCodebook_master.EvaluatorID)
AND (tblcodebook1.StoryID = tblCodebook_master.StoryID)
WHERE (((tblCodebook_master.StoryID) Is Null) AND
((tblCodebook_master.EvaluatorID) Is Null));


my tables for this query are tblcodebook1 and tblcodebook_master
Jul 23 '07 #2
nico5038
3,080 Expert 2GB
Sorry, here is my correct query, had a mistype...

SELECT tblcodebook1.StoryID, tblcodebook1.EvaluatorID

FROM tblcodebook1 LEFT JOIN tblCodebook_master ON (tblcodebook1.EvaluatorID = tblCodebook_master.EvaluatorID)
AND (tblcodebook1.StoryID = tblCodebook_master.StoryID)
WHERE (((tblCodebook_master.StoryID) Is Null) AND
((tblCodebook_master.EvaluatorID) Is Null));


my tables for this query are tblcodebook1 and tblcodebook_master
You could create a giant UNION query like:
Expand|Select|Wrap|Line Numbers
  1. select "db001" as Origin, StoryID, EvaluatorID from tblcodebook1 IN C:\VB\Codebook1.MDB
  2. UNION
  3. select "db002" as Origin, StoryID, EvaluatorID from tblcodebook1 IN C:\VB\Codebook2.MDB
  4. UNION
  5. ...etc...
  6.  
Becuase of the Origin field constant you can check where the values are available or not.

Getting the idea ?

Nic;o)
Aug 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Reply via newsgroup | last post by:
Folks, When performing an update in mysql (using PHP), can I find out how many records were matched? mysql_affected_rows() won't work... and I have the following problem that I thought I...
8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
2
by: Colleyville Alan | last post by:
I want to extract some records that are common to three tables, but not contained in the fourth. Following what I have see in the archives and also trying the unmatched records query wizard, if I...
6
by: Damon Grieves | last post by:
Hi I just want to be sure I understand how the Access client works. If I have an Access back end with a million records on a server and an Access client. If the client is installed on the users pc...
1
by: rfranzl | last post by:
Hello, I need some help, I have about 200 databases that are copies of an original database that has a similiar table in all of the databases, called "tblCodebook". What I am trying to do is to...
1
by: MLH | last post by:
For many versions, Access has had query wizard to identify and list records in table A that had no matching records in table B. But suppose that in addition to that, I would like to see records in...
0
by: Sharon V | last post by:
This is driving me crazy - my unmatched query wizard will not display field names for any tables I choose. All my other query wizards work properly. I am running Access 2003. I have tried using...
13
by: Charlotte | last post by:
Hi, i've googeled to find a asp-script that can compare all the records in two different access databases the mdb's have exactly the same tables what i want is that (the output) all the...
3
by: Bizmark | last post by:
Access2003, Windows XP Pro OEM user OS, Windows Sever 2000 server OS. Not-so-recently I inherited 3 Access DB's from another company merging with our own. Our own system works off of SQL...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.