Understanding Elements of a Query

In this section you will create a template to use as a basis for developing simple queries.

Most queries can be built upon the following grammatical framework:

SELECT
  {}
ON COLUMNS
FROM Sample.Basic

SELECT in line 1 is the keyword that begins the main body of all MDX statements.

The braces { } in line 2 are a placeholder for a set. In the above query, the set is empty, but the braces remain as a placeholder.

  To create a query template:

  1. Create a folder to store sample queries that can be run against the Sample.Basic database.

    For example, create a folder called “queries” under the ARBORPATH/app/Sample/Basic directory of the Essbase installation.

  2. Using a text editor, type the following code into a blank file:

    SELECT
      {}
    ON COLUMNS
    FROM Sample.Basic
  3. Save the file as qry_blank.txt to the queries folder.

    Note:

    If you are using the MDX Script Editor in Administration Services, instead of a text editor, save the query as qry_blank.MDX from MDX Script Editor.