Answer the question
In order to leave comments, you need to log in
How to link tables that are in different databases?
Application on ASP.NET MVC. A field from a table stores the names of the names of tables from another database in which the data is located. It can be processed in VIEW using Razor, but the data must be used in calculations and it is more expedient to receive it in the controller. How to make a request?
Answer the question
In order to leave comments, you need to log in
Use 2 datasources, and then understand at the code level. In my opinion this is the best solution. And there are plenty of other options.
You can use the OPENROWSET statement in a query . Using it, you can execute a request to another server as part of a request to one server, specifying all the necessary connection details directly in the operator. The result will be returned as a regular table.
You can also use linked servers .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question