473,703 Members | 2,859 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP NEEDED! Trying to do a unmatched query on many different databases with a macro

3 New Member
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 "tblCodeboo k".

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 "tblCodeboo k". There is a shared primary key in the "tblCodeboo k" which is a StoryID and EvaluatorID which together is unique.

Here is my query:
SELECT tblcodebook1.St oryID, tblcodebook1.Ev aluatorID
FROM tblcodebook1 LEFT JOIN tblCodebook_mas ter ON (tblcodebook1.E valuatorID = tblCodebook_mas ter.EvaluatorID )
AND (tblcodebook1.S toryID = tblCodebook_mas ter.StoryID)
WHERE (((tblCodebook_ master.StoryID) Is Null) AND
((tblCodebook_m aster.Evaluator ID) Is Null));


my tables for this query are tblcodebook1 and tblcodebook_mas ter


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 "tblCodeboo k" 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 24 '07 #1
1 1990
Lysander
344 Recognized Expert Contributor
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 "tblCodeboo k".

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 "tblCodeboo k". There is a shared primary key in the "tblCodeboo k" which is a StoryID and EvaluatorID which together is unique.

Here is my query:
SELECT tblcodebook1.St oryID, tblcodebook1.Ev aluatorID
FROM tblcodebook1 LEFT JOIN tblCodebook_mas ter ON (tblcodebook1.E valuatorID = tblCodebook_mas ter.EvaluatorID )
AND (tblcodebook1.S toryID = tblCodebook_mas ter.StoryID)
WHERE (((tblCodebook_ master.StoryID) Is Null) AND
((tblCodebook_m aster.Evaluator ID) Is Null));


my tables for this query are tblcodebook1 and tblcodebook_mas ter


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 "tblCodeboo k" 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!!!! !!
Hi, I have just answered a problem above, and I think the same solution would solve your problem

What you need to do is write some code that would loop through all your databases and drop the table tblCodeBook, then re-create a link to the same table in the next database. The article below (not written by me) details how to create a link to a table

http://www.alvechurchdata.co.uk/acclink.htm
Jul 24 '07 #2

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

Similar topics

8
1607
by: Stephen | last post by:
I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored procedure. If there are no records returned then this would give me an indicator and I can re-direct the page somewhere more appropriate. Well this is the theory. I have never used datatables before and am not sure how to implemenet what I want so I was...
2
3114
by: MichaelH | last post by:
Hi all, I am writing a program that has to draw musical notes on a staff. To do this I need to draw Ellispses (representing the notes) on a horizontal line and rotate them slightly (by 15 degrees). So there might be say, 3 ellispses each one seperated from the next by 30 pixals along the x-axis but each ellipse should have the same y coordinate. However everytime I try and rotate the ellispe using the RotateTransform() method and...
10
14847
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the first method it is working fine. Then when I try to invoke the second method it return me an error, Just In-Time Debugging, with error message "An exception 'System.StackOverflowException' has occurred in WebServices"
3
2784
by: Dennis | last post by:
Hello all. I have an app that is giving me problems on a WindowsXP x64 machine. When I go to close the application the Main form closes, but when I look at TaskManager the process still resides in the list. Using SPY++ I can see that a "WindowsFormsParkingWindow" and ".NET BroadcastEventWindow1.0.5000.0.1" are associated to my app by looking at the Properties->Process Tab then selecting the ThreadID shows me my application in the...
2
2904
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on the site, I made : rpm -i MySQL-server-5.0.18-0.i386.rpm then i have errors that relate to many conflicts. I cannot figure out why -and- cannot upgrade. Please Help !
3
2415
by: Kitana907 | last post by:
Hi- I'm attempting to write a module that uses and updates info from two tables and does the following: Opens the recordset of a table called "tblstoreinv" If the Needed Field in the tblstoreinv table is null and is less than the DCOH field from the tbldcinv then: The Shipped Field in the tblstoreinv table equals the Needed Field and the DCOH field from tbldcinv = DCOH - Shipped Else If Needed from tblstoreinv is > DCOH from tbldcinv,...
9
2094
by: smartbei | last post by:
Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with 10 coins you can reach a certain amoung, taken as a parameter. Here is the current program: coins = (100,10,5,1,0.5) anslist = def bar(fin, hist = {100:0,10:0,5:0,1:0,0.5:0}): s = sum(x*hist for x in hist)
0
1145
by: shantanuaggarwal | last post by:
Hi,, I have one following question that whether attributes can help me in resolving this problem: I have one base class called Employee and I have 3 classes which inherit it: EmployeeA EmployeeB EmployeeC
2
2900
by: rookiejavadude | last post by:
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone help? my script is below. thank you import java.awt.*; //import all java.awt import java.awt.event.*; //import all java.awt.event import java.util.*; //import all java.util import javax.swing.*; //import all javax.swing class Product...
1
2616
by: Joel Fireman | last post by:
Help Needed: Upgrade Fedora 4 / Apache 2 to PHP 5.2.x from 5.0.4 I've been testing Joomla as a content manager for the County offices, and it looks pretty good. Unfortunately, I decided to upgrade it from the 1.0.13 version to 1.5 as we get ready to go live with the web site... and the update installation gives an error in XML processing, which seems (from what I've been able to dredge up in forum discussions) to stem from a known bug in...
0
8743
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8659
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
9239
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
8951
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
7843
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
5920
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4674
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2422
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2054
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.