Executing MDX queries in T-SQL environments
Throughout this book, numerous recipes showed how to create various calculations, either directly in MDX queries or inside the MDX script. Prior to writing and running the queries, you naturally had to establish the connection to your Analysis Services server instance and click on the New Query icon, which opened the SQL Server Management Studio's built-in MDX editor. The other option for running those queries, which we didn't show in this book, was to use the other Analysis Services frontend tool that allows writing and executing MDX queries.
To connect to data sources such as Analysis Services, applications use providers. A relational database environment, on the other hand, allows us to use those providers to run distributed queries, also known as pass-through queries. This feature opens the window of possibilities for us. We can combine results from the cube with those in the data warehouse or simply get the flattened result of an MDX query...