官术网_书友最值得收藏!

Working with several queries

When working with several queries, it is recommended to work with conventions.

First of all, we would like to give a meaningful name to each query. This is important for several reasons, as follows:

  • When the report consumes several queries, it is easier to know which query should be edited.
  • Reports travel through time and users. They are changed over time and can lose track of their initial purpose. Working with conventions will keep the report as clear as possible.
  • Theoretically, when running a report that is a combination of several queries, one or more queries can fail to retrieve results. By giving each query a name, it would be easier to identify which query is the problematic one. This is why it is recommended to not give generic names such as query 1, query 2, and so on.

How to do it...

We will be able to edit the query by right-clicking on the Query tab, as shown in the following screenshot:

The Rename query pane will pop up and we will be able to give the query a meaningful name, as shown:

Now that both of the queries have a meaningful name, it will be much more organized and it will be easy to work with several queries.

There's more...

Besides renaming, there are several additional actions that can be performed as well:

  • Move: The query can be moved left or right. When working with several queries, it can be useful to order them according to the data subjects.
  • Duplicate: This option duplicates the query and is extremely helpful when we are building several queries that are similar to each other.
  • Delete: When a query is no longer required, it can be deleted.

    Note

    Note that there is no undo option for this action or for the other actions in the Query panel.

If we want to monitor all the query statistics, we should use the Data view in the report level. Here, we can see all the queries and their basic statistics such as duration, number of rows retrieved, and so on:

This panel is very important because it enables us to get all the query statistics in one place as well as manage them by right-clicking on one of the query names.

By double-clicking on the query name, we will switch to raw data display, which is similar to the preview pane in the Query Panel.

See also

  • For more on how to manage each query property, refer to the next recipe, Working with the query properties
主站蜘蛛池模板: 晋宁县| 德令哈市| 江油市| 赤城县| 克什克腾旗| 怀化市| 醴陵市| 夏津县| 景谷| 安岳县| 奇台县| 泸溪县| 五大连池市| 闽清县| 尼木县| 武冈市| 奈曼旗| 仪陇县| 张北县| 开封市| 额济纳旗| 修文县| 南汇区| 广水市| 三原县| 永丰县| 盐津县| 寿阳县| 闸北区| 天镇县| 松滋市| 达日县| 承德市| 德清县| 宕昌县| 洮南市| 黄石市| 岗巴县| 连山| 嫩江县| 海宁市|