- 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.
- Mastering Concurrency Programming with Java 8
- Flask Web全棧開發實戰
- Java多線程編程實戰指南:設計模式篇(第2版)
- Mobile Application Development:JavaScript Frameworks
- The Android Game Developer's Handbook
- C#程序設計實訓指導書
- Access 數據庫應用教程
- Developing Middleware in Java EE 8
- 青少年美育趣味課堂:XMind思維導圖制作
- Hands-On C++ Game Animation Programming
- 從零開始學Linux編程
- Getting Started with Nano Server
- JBoss:Developer's Guide
- 深度學習原理與PyTorch實戰(第2版)
- Java EE 8 and Angular