- 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.
- Objective-C應(yīng)用開發(fā)全程實錄
- Visual Basic程序開發(fā)(學(xué)習(xí)筆記)
- Mastering Spring MVC 4
- Dependency Injection in .NET Core 2.0
- 算法訓(xùn)練營:提高篇(全彩版)
- Visual FoxPro程序設(shè)計習(xí)題集及實驗指導(dǎo)(第四版)
- 移動互聯(lián)網(wǎng)軟件開發(fā)實驗指導(dǎo)
- Python 3.7從入門到精通(視頻教學(xué)版)
- Learning Material Design
- Machine Learning With Go
- Python商務(wù)數(shù)據(jù)分析(微課版)
- Python Deep Learning
- 算法訓(xùn)練營:海量圖解+競賽刷題(入門篇)
- Mastering Magento Theme Design
- Python程序設(shè)計現(xiàn)代方法