Can you use multiple databases from diferent connections for doing a statement

Zenonpc's profile image Zenonpc posted 3 weeks ago in General Permalink

Hello, I'm new to using HeidiSQL, and I would like to know if it’s possible to run an SQL statement that combines data from two different databases from different systems. For example, in my case, I have a Microsoft SQL Server database and a Firebird database in HeidiSQL, and I want to create a statement that joins the table Prueba (in Microsoft SQL Server) with the table Prueba2 (in Firebird).

image.png

ansgar's profile image ansgar posted 3 weeks ago Permalink

No, you can't. At least not with HeidiSQL. Queries are sent to one server, and results are then displayed, just that simple.

You could export data from one server to the other one, to have everything you need on one server.

Zenonpc's profile image Zenonpc posted 3 weeks ago Permalink

Okay... Just to clarify, when you say server are you refering to the SQL database engines? I asked this because those engines are in the same server. So i't's posible to use both in a statement?

ansgar's profile image ansgar posted 3 weeks ago Permalink

I meant "database server", but this is probably MySQL talk, not MS SQL. This is not the physical server, but the server software, listening on one port, which you connect per HeidiSQL.

Zenonpc's profile image Zenonpc posted 3 weeks ago Permalink

Thank you for your response, so to sum up is imposible to do it in HeidiSQL what I want to do, right?

ansgar's profile image ansgar posted 3 weeks ago Permalink

Right, with HeidiSQL you cannot join two tables from different connections.

So we have yet another new word "connection", in addition to server, session, instance, engine, ... ;)

Please login to leave a reply, or register at first.