Overview of application:
I have a Delphi application that allows a user to run queries over MySQL databases on different systems, using a TADOQuery component to retrieve the data. The user can retrieve data from an identical tables on two different systems (e.g. table_xyz in database_abc on system1 and system 2) by running two separate queries, and then the two sets of data are written to file and manually joined on the PC to form one report.
Question:
Is it possible to select data from an identical table/database on different systems with one query? I'm pretty confident that this isn't possible due to the limitation of the TADOQuery's connection string having to point to a single system, but I want to make sure that this is correct.
I know that it's possible to retrieve data from two identical tables in two different databases on the same system by using a UNION statement, e.g.:select * from database1.table_xyz UNION select * from database2.table_xyz
What I need to do is similar to the above example, only retrieving data from databases that are on different systems. Basically, is it possible to somehow incorporate the connection string in the SQL statement, or connect in a different way somehow?
Like I said, I'm sure that this isn't possible, but it doesn't hurt to check!