Database Reference
In-Depth Information
Table 14-2. Features of the MDX Editor Within SQL Server Management Studio
Feature
Description
Database Selector dropdown
Allows you to select which database for your query window to
use. Since the SSAS server can host many databases, you must
select which database to use by selecting it in this dropdown
prior to executing MDX code for that database.
Cube Selector dropdown
Allows you to choose which cube in the database your Cube
Metadata tab will use. One SSAS database can have many
cubes; therefore, the correct one must be selected to display.
This does not affect the query window.
New Query and MDX Query buttons
Creates a new MDX query window. The New Query button is
context sensitive, and creates an MDX query window only if
you are currently connected and focused on SSAS in Object
Explorer. Otherwise a standard SQL query window is created
instead. (The MDX query button always creates an MDX
query window.)
Query window
Provides a location to type in one or more MDX statements,
but only one statement can be executed at a time. It should be
noted that this is very different from the SQL query window,
which can execute several statements at a time.
Execute Selected Query button
Sends the highlighted MDX code to the SSAS database engine
for processing.
Results pane
Shows the results of the executed query.
Show/Hide Results button
Allows you to toggle between showing and hiding the Results
pane. This button is not included in the UI by default and
must be added by customizing the toolbar. Instruction on
how to do so can be found by searching for Customizing
Visual Studio 2010 toolbar . The Ctrl + R shortcut can be used
as an alternative to this button.
Cube Metadata tab
Allows you to browse the cube's members, levels, hierarchies,
and dimensions. You can drag items from this tab into the
query window, and its location within the cube will be typed
out for you.
Reconnect button
Allows you to reconnect to the SSAS server. If you change,
deploy, or process the cube or dimensions, you must
reconnect using this button before those changes show
up on the Cube Metadata tab. Since this tab is quite
useful in creating your MDX code using its drag-and-drop
functionality, it is a very good button to know about.
Optional Syntax
In MDX, parentheses, braces, brackets, and semicolons are optional syntax items. We created a comparison using
MDX code in Listing 14-4.
 
 
Search WWH ::




Custom Search