- Microsoft SQL Server 2014 Business Intelligence Development Beginner’s Guide
- Reza Rad
- 243字
- 2021-08-13 17:55:23
Time for action – using a Named Query
Sometimes, you need to write queries instead of bringing tables and views as is from the database (assume that we don't have access to the underlying database in order to create views or change the structure of tables there). Named Query is a query that runs on the database and its result will be shown as a table in DSV. In this example, we will use a Named Query to bring the product category and subcategory along with the product table columns, by performing the following steps:
- In the Data Source View designer, right-click on the DimProduct table and under Replace Table, choose With New Named Query.
- In the Create Named Query window, add the ProductCategory and ProductSubCategory tables, and the designer will write joined statements itself.
- After that step, choose EnglishProductCategoryName and EnglishProductSubcategoryName from the columns list.
- Explore data of the DimProduct Named Query and review the result.
What just happened?
In this example, we used a Named Query and a query designer to write customized queries on the database. The query language used is T-SQL because the underlying database is SQL Server. However, it can be different based on the database.
You can also create logical keys for Named Queries or views. You can also create relationships between tables, views, and Named Queries in the DSV. These features in the DSV will provide the ability to develop a powerful base for the cube.
- Clojure Programming Cookbook
- 精通Nginx(第2版)
- React Native Cookbook
- Offer來了:Java面試核心知識點精講(原理篇)
- 精通搜索分析
- NumPy Essentials
- Instant 960 Grid System
- PHP網絡編程學習筆記
- 學Python也可以這么有趣
- Unity Game Development Scripting
- Visual Basic程序設計上機實驗教程
- C#開發案例精粹
- SSM開發實戰教程(Spring+Spring MVC+MyBatis)
- UNIX Linux程序設計教程
- Oracle Data Guard 11gR2 Administration Beginner's Guide