Exercise: Running Your First Query

Recall that the braces { } in line 2 of your query template are a placeholder for a set. In this exercise, we will add a set to the query and run it.

  To run the query:

  1. Open qry_blank.txt.

  2. Because a set can be as simple as one tuple, add Jan as a set to the query template. Retain the braces (required for all set specifications except for sets that are produced by a function call).

    Type Jan inside the braces in line 2:

    SELECT 
      {Jan}
    ON COLUMNS
    FROM Sample.Basic
  3. Save the query as qry_first.txt.

  4. Ensure that Essbase is started (the essbase.exe process is running).

  5. In order for Essbase to receive MDX statements, pass the statements to Essbase using either the MaxL Shell or MDX Script Editor in Administration Services. The examples in this chapter use the MaxL Shell.

    Start the MaxL Shell and log on with a valid user name and password. For example,

    essmsh -l admin passwd
  6. Copy and paste the entire SELECT query into the MaxL Shell, but do not press Enter yet.

  7. Enter a semicolon at the end, anywhere after Basic but before pressing Enter. The semicolon is not part of MDX syntax requirements, but it is required by MaxL Shell to indicate the end of a statement that is ready to execute.

    Note:

    If you are using the MDX Script Editor in Administration Services, do not terminate with a semicolon.

  8. Press Enter.

Results: The results should be similar to the following:

Jan
  8024