Forum Discussion

BanNguyen's avatar
BanNguyen
Frequent Visitor
2 years ago
Solved

= Sql.Database (Server, Database, [Query= - Can I access 2 different Database name in a sub query

Hi everyone, My problem is I have SQL subquery imported into Power BI to load data and also created a Database parameter so users can easily change the data sources whenever they want to change the ...
  • lbendlin's avatar
    2 years ago

    You cannot dynamically change the server name.  You can run native queries that swap out the database name if the database is on the same server and you have access to both databases.

     

    It is possible to change the server name via parameters in the service, or as part of deployment pipelines.