Re: Can I join tables from different databases?

Daniel Gross <[email protected]>
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
Hi Gio,

not without some hassle.

There is an option to store MySQL tables in DB2 - but only for MySQL running on IBM i - with this option you could then JOIN the table on IBM i SQL level without problems, as all tables are in the same database. Probably you can replicate the table from the Windows MySQL server to your MySQL running on IBM i:

- https://www.redbooks.ibm.com/redbooks/pdfs/sg247705.pdf
- https://www.scottklement.com/presentations/Intro%20to%20the%20MySQL%20IBMDB2I%20Storage%20Engine.pdf

There is another option to use JDBC - but no chance to JOIN - you would have to do that programmatically:

- https://www.scottklement.com/jdbc/

You should lookup the net for any other options, but a quick search gave me those two.

HTH and kind regards,
Daniel




> Am 08.02.2026 um 14:57 schrieb gio.cot via RPG400-L <[email protected]>:
> 
> Hi all
> i would need to execute SQL statement (in RPGLE program) that join a IBM i
> Table with a MySql table that is stored in a external data base (windows
> server) ...
> in your opinion is it possbile ??
> Thanks in advance
> 
> Gio
> 
> --
> This is the RPG programming on IBM i (RPG400-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/rpg400-l.
> 
> Please contact [email protected] for any subscription related questions.
> 
-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.