Reference External DB and Application DB in one SQL Query
Hello,
I am writing a SQL Query that references tables in different databases, one that exists in the External database (BI Blend) and one that exists in the Application database. I am having trouble setting up my data adapter to allow for pulling in both tables to perform a Union, as I need to specify the Database Location. Is this possible?
As Teresa and Daniel have pointed out. You can achieve this with a Dashboard DataSet BR.
You would need to execute both sql commands separately e.g datatable1 is from application database and datatable2 is from framework database
You can then use the DataTable Merge method (assuming both datatables have the same columns as per your union statement) to merge the two datatables.
Then return the merged DataTable to your Data Adapter.
https://learn.microsoft.com/en-us/dotnet/api/system.data.datatable.merge?view=net-9.0&redirectedfrom=MSDN#overloads
Hope this helps